Skip to content

Commit 6194fe6

Browse files
committed
Core - MethodRunnerQueue add additional IsCancellationRequested checks
1 parent 0f691b6 commit 6194fe6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CefSharp/Internals/MethodRunnerQueue.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@ public void Dispose()
3232

3333
public void Enqueue(MethodInvocation methodInvocation)
3434
{
35+
if(cancellationTokenSource.IsCancellationRequested)
36+
{
37+
return;
38+
}
39+
3540
Task.Factory.StartNew(() =>
3641
{
42+
if (cancellationTokenSource.IsCancellationRequested)
43+
{
44+
return;
45+
}
46+
3747
var result = ExecuteMethodInvocation(methodInvocation);
3848

3949
var handler = MethodInvocationComplete;

0 commit comments

Comments
 (0)