Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public virtual Task StartAsync(CancellationToken cancellationToken)
_stoppingCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);

// Execute all of ExecuteAsync asynchronously, and store the task we're executing so that we can wait for it later.
_executeTask = Task.Run(() => ExecuteAsync(_stoppingCts.Token), _stoppingCts.Token);
_executeTask = Task.Factory.StartNew(() => ExecuteAsync(_stoppingCts.Token), _stoppingCts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);

// Always return a completed task. Any result from ExecuteAsync will be handled by the Host.
return Task.CompletedTask;
Expand Down
Loading