apple / swift-async-algorithms

Async Algorithms for Swift
Apache License 2.0
3.06k stars 151 forks source link

Remove majority of `@unchecked Sendable` usages #295

Closed FranzBusch closed 1 year ago

FranzBusch commented 1 year ago

Motivation

@unchecked Sendable is a great way to make a type Sendable while it is not really Sendable this is rarely useful and we should rather use conditional @unchecked Sendable annotations such as the one on ManagedCriticalState

Modification

This PR removes all @unchecked Sendable in the main algorithm target except the one on Merge since we are doing manual locking there.

Result

No more @unchecked Sendable usage.