public async Task Run(OperationArguments args) { _outboundSemaphore = new SemaphoreSlim(1); await ForwardPorts(args).ConfigureAwait(false); _compiledFs = await SetupCompiledFs(args).ConfigureAwait(false); _compiledFs.RegisterUpdateNotifier(OnAssetUpdated); await ServiceDevice().ConfigureAwait(false); }
public DefaultAssetManager( IKernel kernel, ICompiledAssetFs compiledAssetFs, IProfiler[] profilers, ICoroutine coroutine, IConsoleHandle consoleHandle) { _kernel = kernel; _compiledAssetFs = compiledAssetFs; _profiler = profilers.Length > 0 ? profilers[0] : null; _consoleHandle = consoleHandle; _assets = new Dictionary <string, ISingleAssetReference <IAsset> >(); _assetsToLoad = new ConcurrentQueue <ISingleAssetReference <IAsset> >(); _assetsToFinalize = new ConcurrentQueue <Tuple <IAsset, ISingleAssetReference <IAsset> > >(); _compiledAssetFs.RegisterUpdateNotifier(OnAssetUpdated); coroutine.Run(FinalizeAssets); }