Files
swift-mirror/stdlib/public/Concurrency/Task.swift
Alastair Houghton a9ed11ca96 [Concurrency] Fix race condition in _runAsyncMain.
As of the custom main/global executor changes, there is a race in
`_runAsyncMain()` to construct the main executor; if this goes the wrong way,
the IRGen async tests, which use this function, can fail.

Fix by explicitly constructing a task and enqueing it on the main executor,
instead of detaching a task and trying to hop to it.

rdar://148506256
2025-04-03 12:07:52 +01:00

58 KiB