Skip to content

Remove Atomic in favor of Mutex#807

Merged
mickael-menu merged 1 commit into
readium:swift6from
grighakobian:remove-atomic
Jun 12, 2026
Merged

Remove Atomic in favor of Mutex#807
mickael-menu merged 1 commit into
readium:swift6from
grighakobian:remove-atomic

Conversation

@grighakobian

Copy link
Copy Markdown
Contributor

Atomic was a DispatchQueue-based property wrapper that predates the Mutex primitive now available in the toolkit. It has no usages in the codebase and is not Sendable, making it incompatible with Swift 6 strict concurrency.

Mutex<Value> is a direct replacement: it protects mutable state via os_unfair_lock, is @unchecked Sendable, and works on iOS 15+.

`Atomic` was a DispatchQueue-based property wrapper that predates the
`Mutex` primitive now available in the toolkit. It has no usages in the
codebase and is not `Sendable`, making it incompatible with Swift 6
strict concurrency.

`Mutex<Value>` is a direct replacement: it protects mutable state via
`os_unfair_lock`, is `@unchecked Sendable`, and works on iOS 15+.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@mickael-menu mickael-menu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@mickael-menu mickael-menu merged commit 299d177 into readium:swift6 Jun 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants