Always create TaskCompletionSource<T> with TaskCreationOptions.RunContinuationsAsynchronously

This commit is contained in:
Bond_009
2022-01-22 17:06:57 +01:00
parent cd675475bc
commit 832da133d8
5 changed files with 6 additions and 6 deletions

View File

@@ -159,7 +159,7 @@ namespace Emby.Server.Implementations.Net
{
ThrowIfDisposed();
var taskCompletion = new TaskCompletionSource<SocketReceiveResult>();
var taskCompletion = new TaskCompletionSource<SocketReceiveResult>(TaskCreationOptions.RunContinuationsAsynchronously);
bool isResultSet = false;
Action<IAsyncResult> callback = callbackResult =>
@@ -195,7 +195,7 @@ namespace Emby.Server.Implementations.Net
{
ThrowIfDisposed();
var taskCompletion = new TaskCompletionSource<int>();
var taskCompletion = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
bool isResultSet = false;
Action<IAsyncResult> callback = callbackResult =>