Files
swift-certificates/Sources
George Barnett 48d7c83a47 Don't hold a lock over a continuation in Promise (#286)
Motivation:

The various 'withMumbleContinuation' APIs are supposed to be invoked
synchronously with the caller. This assumption allows a lock to be
acquired before the call and released from the body of the
'withMumbleContinuation' after e.g. storing the continuation. However
this isn't the case and the job may be re-enqueued on the executor
meaning that this is pattern is vulnerable to deadlocks.

Modifications:

- Drop and reacquire the lock in Promise
- Avoid resuming continuations while holding the lock

Result:

Lower chance of deadlock
2025-11-25 08:52:23 +00:00
..
2023-06-20 01:51:53 -07:00