public Task StartAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("Initializing WebScriptHostManager.");
            _hostTask = _scriptHostManager.EnsureHostStarted(_cancellationTokenSource.Token);

            return(Task.CompletedTask);
        }
Exemple #2
0
        private void OnSpecializationTimerTick(object state)
        {
            EnsureInitialized((WebHostSettings)state);

            // We know we've just specialized, since this timer only runs
            // when in standby mode. We want to initialize the host manager
            // immediately. Note that the host might also be initialized
            // concurrently by incoming http requests, but the initialization
            // here ensures that it takes place in the absence of any http
            // traffic.
            _activeHostManager?.EnsureHostStarted(CancellationToken.None);
        }