updates the BackgroundTaskRunnerAwaiter so that it exits if the runner is not running when it is ctor'd, adds diags.

This commit is contained in:
Shannon
2015-04-09 17:59:34 +10:00
parent c525be3e44
commit c78b371965
2 changed files with 18 additions and 3 deletions

View File

@@ -260,6 +260,8 @@ namespace Umbraco.Web.Scheduling
{
if (token.IsCancellationRequested || _tasks.Count == 0)
{
LogHelper.Debug<BackgroundTaskRunner<T>>("_isRunning = false");
_isRunning = false; // done
if (_options.PreserveRunningTask == false)
_runningTask = null;