Repository navigation
Fixes a deadlock that can happen when you enqueue a task while holding a lock that the task's operation also takes in a priority escalation handler.
Fixes
Task(on:)no longer runs the new task's priority escalation handlers on the thread that enqueues it. On macOS/iOS/tvOS/watchOS/visionOS 26+ and Linux, this used to happen when the task began its operation beforeTask(on:)returned and a higher-priority task was already waiting behind it.Task(on:)then escalated the task in place and ran itswithTaskPriorityEscalationHandler(operation:onPriorityEscalated:)handler on the enqueueing thread. That deadlocked if the enqueueing code held a lock the handler also takes, and could deadlock when enqueueing from a cancellation handler. NowTask(on:)escalates the task from a new task, and the task also raises its own priority as its turn begins, so it still takes its turn at the escalated priority. (#106)
Other
- Main-actor tests check the main dispatch queue instead of
Thread.isMainThread, and the Linux CI job also runs the tests in debug. (#105)
Full Changelog: 2.0.0...2.0.1