We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80746af commit 5fb7fecCopy full SHA for 5fb7fec
src/CoroutineScheduler/Scheduler.cs
@@ -63,7 +63,11 @@ public Scheduler()
63
private ContextCallback? Runner { get; set; }
64
65
private int? ResumingOnThread { get; set; }
66
- private bool RequiresMarshalling => ResumingOnThread is null || ResumingOnThread.Value != Thread.CurrentThread.ManagedThreadId;
+ private bool RequiresMarshalling => ResumingOnThread switch
67
+ {
68
+ int resumingThread => resumingThread != Thread.CurrentThread.ManagedThreadId,
69
+ _ => true,
70
+ };
71
72
/// <summary>
73
/// Resume any tasks that are at the point of invocation are currently awaiting `Yield()`, and <br />
0 commit comments