Skip to content

Commit

Permalink
Core - MethodRunnerQueue add additional IsCancellationRequested checks
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Jun 25, 2021
1 parent 0f691b6 commit 6194fe6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CefSharp/Internals/MethodRunnerQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@ public void Dispose()

public void Enqueue(MethodInvocation methodInvocation)
{
if(cancellationTokenSource.IsCancellationRequested)
{
return;
}

Task.Factory.StartNew(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
{
return;
}

var result = ExecuteMethodInvocation(methodInvocation);

var handler = MethodInvocationComplete;
Expand Down

0 comments on commit 6194fe6

Please sign in to comment.