提交 b6fe706e 编写于 作者: S Stephen Toub 提交者: GitHub

Specify TaskScheduler.Default in EventPipeEventDispatcher (dotnet/coreclr#24930)

Just in case there's a non-default TaskScheduler in play, explicitly specify TaskScheduler.Default so that we don't accidentally schedule this task to another scheduler, in which case it's up to that scheduler if and how to respect the LongRunning request.

Commit migrated from https://github.com/dotnet/coreclr/commit/e4bbbd6ea114eda756fe7f99e29ca8d908160521
上级 2203405d
......@@ -138,7 +138,7 @@ private void StartDispatchTask()
if (m_dispatchTask == null)
{
m_stopDispatchTask = false;
m_dispatchTask = Task.Factory.StartNew(DispatchEventsToEventListeners, TaskCreationOptions.LongRunning);
m_dispatchTask = Task.Factory.StartNew(DispatchEventsToEventListeners, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册