Skip to content

Commit a8d119a

Browse files
committed
[SE-0311] Add Sendable requirement to TaskLocal.
This is part of SE-0311 that was not implemented. Fixes rdar://77441933.
1 parent 68418cd commit a8d119a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/public/Concurrency/TaskLocal.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ import Swift
9595
/// value for lookups in the task local storage.
9696
@propertyWrapper
9797
@available(SwiftStdlib 5.5, *)
98-
// TODO: add Sendable enforcement when we're ready to do so rdar://77441933
99-
public final class TaskLocal<Value>: UnsafeSendable, CustomStringConvertible {
98+
public final class TaskLocal<Value: Sendable>: Sendable, CustomStringConvertible {
10099
let defaultValue: Value
101100

102101
public init(wrappedValue defaultValue: Value) {

0 commit comments

Comments
 (0)