ReadWriteBox is Sendable

This commit is contained in:
Gwendal Roué committed 2024-08-25 17:21:19 +02:00
1 parent 5333dbeff1
commit e93e4c5a31
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -3,7 +3,8 @@ import Dispatch
/// A ReadWriteBox grants multiple readers and single-writer guarantees on a
/// value. It is backed by a concurrent DispatchQueue.
@propertyWrapper
final class ReadWriteBox<T> {
final class ReadWriteBox<T: Sendable>: @unchecked Sendable {
// @unchecked because `_wrappedValue` is protected by `queue`
private var _wrappedValue: T
private var queue: DispatchQueue
+1 -1
View File
@@ -110,7 +110,7 @@
- [ ] GRDB7: Sendable: ValueObservationScheduler (8429eb68)
- [X] GRDB7: Sendable: DatabaseCollation (4d9d67dd)
- [X] GRDB7: Sendable: LogErrorFunction (f362518d)
- [ ] GRDB7: Sendable: ReadWriteBox (57a86a0e)
- [X] GRDB7: Sendable: ReadWriteBox (57a86a0e)
- [ ] GRDB7: Sendable: Pool (f13b2d2e)
- [ ] GRDB7: Sendable: OnDemandFuture fulfill (2aabc4c1)
- [ ] GRDB7: Sendable: WALSnapshotTransaction (7fd34012)