Files
swift-mirror/stdlib/public/Concurrency/ExecutorBridge.h
Alastair Houghton 2b4082e4f9 [Concurrency] Fix task switch performance issue.
When using the new custom default executors, sometimes we end up
taking a long time to do a task switch.  This is happening because
the path the new code takes sometimes results in a concrete pointer
to the default global executor being in the executor tracking
information in `swift_task_switch()`, and if we try to switch to
a `nil` task executor (which _also_ means the default global executor),
we aren’t spotting that and we’re taking the slow path.

Essentially, we want to take the fast path in cases where we switch
from `nil` to the concrete default global executor and vice-versa.

rdar://156701386
2025-07-28 15:49:46 +01:00

1.5 KiB