mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
ReadWriteBox is Sendable
This commit is contained in:
1 parent
40090dbe00
commit
57a86a0e2a
1 file changed
+2
-1
@@ -3,7 +3,8 @@ import Dispatch
|
|||||||
/// A ReadWriteBox grants multiple readers and single-writer guarantees on a
|
/// A ReadWriteBox grants multiple readers and single-writer guarantees on a
|
||||||
/// value. It is backed by a concurrent DispatchQueue.
|
/// value. It is backed by a concurrent DispatchQueue.
|
||||||
@propertyWrapper
|
@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 _wrappedValue: T
|
||||||
private var queue: DispatchQueue
|
private var queue: DispatchQueue
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user