Commit ae24299
Use GCHandle + plain void instead of async void in xUnit RunTest
Replace async void with plain void for the ExecutionContext.Run callback.
The test body runs in an async Task method (runTestCore) whose returned
Task is pinned via GCHandle.Alloc — a root in the GC handle table that
is independent of the managed object graph. This is stronger than
GC.KeepAlive and avoids async void entirely.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 417bdbb commit ae24299
1 file changed
+0
-0
lines changedBinary file not shown.
0 commit comments