Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions TUnit.Core/Executors/DedicatedThreadExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ private void ExecuteAsyncActionWithMessagePump(Func<ValueTask> action, TaskCompl

try
{
var task = Task.Factory.StartNew(async () =>
var task = Task.Factory.StartNew(static async action =>
{
// Inside this task, TaskScheduler.Current will be our scheduler
await action();
}, CancellationToken.None, TaskCreationOptions.None, taskScheduler).Unwrap();
await ((Func<ValueTask>)action!)();
}, action, CancellationToken.None, TaskCreationOptions.None, taskScheduler).Unwrap();

// Try fast path first - many tests complete quickly
// Use IsCompleted to avoid synchronous wait
Expand Down
Loading