You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SoruceKit] Audit SwiftASTManager to prevent deadlocks
- Ensure that no callbacks are called when either of these mutexes are held:
- `SwiftASTConsumer::CancellationRequestCallbackAndIsCancelledMtx`
- `ASTBuildOperation::DependencyStampsMtx`
- Exception: We allow calls to `getBuferStamp` because that doesn’t claim any locks)
- No change was necessary here
- `ASTBuildOperation::ConsumersAndResultMtx`
- `ASTBuildOperation::CacheMtx`
- No change was necessary here
- `ASTBuildOperation::ScheduledConsumersMtx`
- Make sure we always inform the consumers asynchronously, even if the operation was already cancelled when the consumer got enqueued by introducing `ConsumerNotificationQueue`
- Ensure that all callbacks to `SwiftASTConsumer` (i.e. `requestCancellation` and `handlePrimaryAST`, `failed`, `cancelled`) are performed asyncronously from a queue to avoid deadlocks
rdar://110357502
0 commit comments