@@ -18,7 +18,7 @@ import SwiftShims
18
18
// ==== -----------------------------------------------------------------------
19
19
// MARK: Precondition executors
20
20
21
- @available ( SwiftStdlib 5 . 9 , * )
21
+ @available ( SwiftStdlib 5 . 1 , * )
22
22
extension SerialExecutor {
23
23
/// Unconditionally if the current task is executing on the expected serial executor,
24
24
/// and if not crash the program offering information about the executor mismatch.
@@ -35,7 +35,10 @@ extension SerialExecutor {
35
35
/// * In `-Ounchecked` builds, the optimizer may assume that this function is
36
36
/// never called. Failure to satisfy that assumption is a serious
37
37
/// programming error.
38
- @available ( SwiftStdlib 5 . 9 , * )
38
+ @available ( SwiftStdlib 5 . 1 , * )
39
+ #if !$Embedded
40
+ @backDeployed ( before: SwiftStdlib 5.9 )
41
+ #endif
39
42
@_unavailableInEmbedded
40
43
public func preconditionIsolated(
41
44
_ message: @autoclosure ( ) -> String = String ( ) ,
@@ -55,7 +58,7 @@ extension SerialExecutor {
55
58
}
56
59
}
57
60
58
- @available ( SwiftStdlib 5 . 9 , * )
61
+ @available ( SwiftStdlib 5 . 1 , * )
59
62
extension Actor {
60
63
/// Unconditionally if the current task is executing on the serial executor of the passed in `actor`,
61
64
/// and if not crash the program offering information about the executor mismatch.
@@ -72,7 +75,10 @@ extension Actor {
72
75
/// * In `-Ounchecked` builds, the optimizer may assume that this function is
73
76
/// never called. Failure to satisfy that assumption is a serious
74
77
/// programming error.
75
- @available ( SwiftStdlib 5 . 9 , * )
78
+ @available ( SwiftStdlib 5 . 1 , * )
79
+ #if !$Embedded
80
+ @backDeployed ( before: SwiftStdlib 5.9 )
81
+ #endif
76
82
@_unavailableInEmbedded
77
83
public nonisolated func preconditionIsolated(
78
84
_ message: @autoclosure ( ) -> String = String ( ) ,
@@ -92,7 +98,7 @@ extension Actor {
92
98
}
93
99
}
94
100
95
- @available ( SwiftStdlib 5 . 9 , * )
101
+ @available ( SwiftStdlib 5 . 1 , * )
96
102
extension GlobalActor {
97
103
/// Unconditionally if the current task is executing on the serial executor of the passed in `actor`,
98
104
/// and if not crash the program offering information about the executor mismatch.
@@ -109,7 +115,10 @@ extension GlobalActor {
109
115
/// * In `-Ounchecked` builds, the optimizer may assume that this function is
110
116
/// never called. Failure to satisfy that assumption is a serious
111
117
/// programming error.
112
- @available ( SwiftStdlib 5 . 9 , * )
118
+ @available ( SwiftStdlib 5 . 1 , * )
119
+ #if !$Embedded
120
+ @backDeployed ( before: SwiftStdlib 5.9 )
121
+ #endif
113
122
@_unavailableInEmbedded
114
123
public static func preconditionIsolated(
115
124
_ message: @autoclosure ( ) -> String = String ( ) ,
@@ -122,7 +131,7 @@ extension GlobalActor {
122
131
// ==== -----------------------------------------------------------------------
123
132
// MARK: Assert executors
124
133
125
- @available ( SwiftStdlib 5 . 9 , * )
134
+ @available ( SwiftStdlib 5 . 1 , * )
126
135
extension SerialExecutor {
127
136
/// Performs an executor check in debug builds.
128
137
///
@@ -136,7 +145,10 @@ extension SerialExecutor {
136
145
/// * In `-Ounchecked` builds, `condition` is not evaluated, but the optimizer
137
146
/// may assume that it *always* evaluates to `true`. Failure to satisfy that
138
147
/// assumption is a serious programming error.
139
- @available ( SwiftStdlib 5 . 9 , * )
148
+ @available ( SwiftStdlib 5 . 1 , * )
149
+ #if !$Embedded
150
+ @backDeployed ( before: SwiftStdlib 5.9 )
151
+ #endif
140
152
@_unavailableInEmbedded
141
153
public func assertIsolated(
142
154
_ message: @autoclosure ( ) -> String = String ( ) ,
@@ -156,7 +168,7 @@ extension SerialExecutor {
156
168
}
157
169
}
158
170
159
- @available ( SwiftStdlib 5 . 9 , * )
171
+ @available ( SwiftStdlib 5 . 1 , * )
160
172
extension Actor {
161
173
/// Performs an executor check in debug builds.
162
174
///
@@ -170,7 +182,10 @@ extension Actor {
170
182
/// * In `-Ounchecked` builds, `condition` is not evaluated, but the optimizer
171
183
/// may assume that it *always* evaluates to `true`. Failure to satisfy that
172
184
/// assumption is a serious programming error.
173
- @available ( SwiftStdlib 5 . 9 , * )
185
+ @available ( SwiftStdlib 5 . 1 , * )
186
+ #if !$Embedded
187
+ @backDeployed ( before: SwiftStdlib 5.9 )
188
+ #endif
174
189
@_unavailableInEmbedded
175
190
public nonisolated func assertIsolated(
176
191
_ message: @autoclosure ( ) -> String = String ( ) ,
@@ -191,7 +206,7 @@ extension Actor {
191
206
}
192
207
}
193
208
194
- @available ( SwiftStdlib 5 . 9 , * )
209
+ @available ( SwiftStdlib 5 . 1 , * )
195
210
extension GlobalActor {
196
211
/// Performs an executor check in debug builds.
197
212
///
@@ -205,7 +220,10 @@ extension GlobalActor {
205
220
/// * In `-Ounchecked` builds, `condition` is not evaluated, but the optimizer
206
221
/// may assume that it *always* evaluates to `true`. Failure to satisfy that
207
222
/// assumption is a serious programming error.
208
- @available ( SwiftStdlib 5 . 9 , * )
223
+ @available ( SwiftStdlib 5 . 1 , * )
224
+ #if !$Embedded
225
+ @backDeployed ( before: SwiftStdlib 5.9 )
226
+ #endif
209
227
@_unavailableInEmbedded
210
228
public static func assertIsolated(
211
229
_ message: @autoclosure ( ) -> String = String ( ) ,
@@ -218,7 +236,7 @@ extension GlobalActor {
218
236
// ==== -----------------------------------------------------------------------
219
237
// MARK: Assume Executor
220
238
221
- @available ( SwiftStdlib 5 . 9 , * )
239
+ @available ( SwiftStdlib 5 . 1 , * )
222
240
extension Actor {
223
241
/// A safe way to synchronously assume that the current execution context belongs to the passed in actor.
224
242
///
@@ -233,7 +251,10 @@ extension Actor {
233
251
/// if another actor uses the same serial executor--by using that actor's ``Actor/unownedExecutor``
234
252
/// as its own ``Actor/unownedExecutor``--this check will succeed, as from a concurrency safety
235
253
/// perspective, the serial executor guarantees mutual exclusion of those two actors.
236
- @available ( SwiftStdlib 5 . 9 , * )
254
+ @available ( SwiftStdlib 5 . 1 , * )
255
+ #if !$Embedded
256
+ @backDeployed ( before: SwiftStdlib 5.9 )
257
+ #endif
237
258
@_unavailableFromAsync ( message: " express the closure as an explicit function declared on the specified 'actor' instead " )
238
259
@_unavailableInEmbedded
239
260
public nonisolated func assumeIsolated< T> (
0 commit comments