Swift concurrency in Bloom
Check Package.swift and the actual target's compiler flags before inferring isolation. Bloom
uses Swift 6 language mode with a Swift 6.2 minimum toolchain; that alone does not enable default
MainActor isolation or NonisolatedNonsendingByDefault.
Preserve the intended task lifetime. Structured concurrency fits work owned by a caller; unstructured tasks also have legitimate uses for UI actions and app-owned background services. Audit their ownership, cancellation and errors rather than replacing them mechanically.
In reviews, report reproducible defects with file locations and effects. Make requested edits directly. Do not silence sendability errors without establishing how shared state is protected.
Load only the references needed for the task:
- Hotspots: search targets for a concurrency review.
- Swift 6.2 settings: isolation defaults and newer APIs.
- Actors: reentrancy and isolation boundaries.
- Structured tasks: task groups, errors and concurrency limits.
- Unstructured tasks: inheritance and ownership.
- Cancellation: cooperative cancellation and teardown.
- Streams: buffering, termination and consumer lifetime.
- Bridging: continuations and sendability guarantees.
- Interop: GCD, locks, delegates and Combine.
- Bug patterns: recurring failure modes.
- Diagnostics: compiler errors and boundary choices.
- Testing: deterministic concurrency checks and the shared testing guide.