Skip to content

Commit b0a7f0c

Browse files
committed
Fix test.
1 parent c9dc5bd commit b0a7f0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/BenchmarkDotNet/Engines/WorkloadValueTaskSource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token)
4040
=> continuerSource.GetStatus(token);
4141

4242
void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
43-
=> continuerSource.OnCompleted(continuation, state, token, flags);
43+
// Strip UseSchedulingContext to ensure Continue() and Complete() synchronously continue __WorkloadCore.
44+
=> continuerSource.OnCompleted(continuation, state, token, flags & ~ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
4445

4546
bool IValueTaskSource<bool>.GetResult(short token)
4647
=> continuerSource.GetResult(token);

0 commit comments

Comments
 (0)