Skip to content

Commit 6495db7

Browse files
committed
Adopt Sendable in DispatchQueue and similar types
1 parent 292273a commit 6495db7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/swift/Wrapper.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class DispatchObject {
4444
}
4545

4646

47-
public class DispatchGroup : DispatchObject {
47+
public class DispatchGroup : DispatchObject, @unchecked Sendable {
4848
internal let __wrapped:dispatch_group_t;
4949

5050
final internal override func wrapped() -> dispatch_object_t {
@@ -68,7 +68,7 @@ public class DispatchGroup : DispatchObject {
6868
}
6969
}
7070

71-
public class DispatchSemaphore : DispatchObject {
71+
public class DispatchSemaphore : DispatchObject, @unchecked Sendable {
7272
internal let __wrapped: dispatch_semaphore_t;
7373

7474
final internal override func wrapped() -> dispatch_object_t {
@@ -84,8 +84,8 @@ public class DispatchSemaphore : DispatchObject {
8484
}
8585
}
8686

87-
public class DispatchIO : DispatchObject {
88-
internal let __wrapped:dispatch_io_t
87+
public class DispatchIO : DispatchObject, @unchecked Sendable {
88+
internal let __wrapped: dispatch_io_t
8989

9090
final internal override func wrapped() -> dispatch_object_t {
9191
return unsafeBitCast(__wrapped, to: dispatch_object_t.self)
@@ -127,7 +127,7 @@ public class DispatchIO : DispatchObject {
127127
}
128128
}
129129

130-
public class DispatchQueue : DispatchObject {
130+
public class DispatchQueue : DispatchObject, @unchecked Sendable {
131131
internal let __wrapped:dispatch_queue_t;
132132

133133
final internal override func wrapped() -> dispatch_object_t {
@@ -156,6 +156,7 @@ public class DispatchQueue : DispatchObject {
156156
}
157157

158158
public class DispatchSource : DispatchObject,
159+
@unchecked Sendable,
159160
DispatchSourceProtocol, DispatchSourceRead,
160161
DispatchSourceSignal, DispatchSourceTimer,
161162
DispatchSourceUserDataAdd, DispatchSourceUserDataOr,

0 commit comments

Comments
 (0)