@@ -18,7 +18,7 @@ import SwiftShims
1818// ==== -----------------------------------------------------------------------
1919// MARK: Precondition executors
2020
21- @available ( SwiftStdlib 5 . 9 , * )
21+ @available ( SwiftStdlib 5 . 1 , * )
2222extension SerialExecutor {
2323 /// Unconditionally if the current task is executing on the expected serial executor,
2424 /// and if not crash the program offering information about the executor mismatch.
@@ -35,7 +35,10 @@ extension SerialExecutor {
3535 /// * In `-Ounchecked` builds, the optimizer may assume that this function is
3636 /// never called. Failure to satisfy that assumption is a serious
3737 /// programming error.
38- @available ( SwiftStdlib 5 . 9 , * )
38+ @available ( SwiftStdlib 5 . 1 , * )
39+ #if !$Embedded
40+ @backDeployed ( before: SwiftStdlib 5.9 )
41+ #endif
3942 @_unavailableInEmbedded
4043 public func preconditionIsolated(
4144 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -55,7 +58,7 @@ extension SerialExecutor {
5558 }
5659}
5760
58- @available ( SwiftStdlib 5 . 9 , * )
61+ @available ( SwiftStdlib 5 . 1 , * )
5962extension Actor {
6063 /// Unconditionally if the current task is executing on the serial executor of the passed in `actor`,
6164 /// and if not crash the program offering information about the executor mismatch.
@@ -72,7 +75,10 @@ extension Actor {
7275 /// * In `-Ounchecked` builds, the optimizer may assume that this function is
7376 /// never called. Failure to satisfy that assumption is a serious
7477 /// programming error.
75- @available ( SwiftStdlib 5 . 9 , * )
78+ @available ( SwiftStdlib 5 . 1 , * )
79+ #if !$Embedded
80+ @backDeployed ( before: SwiftStdlib 5.9 )
81+ #endif
7682 @_unavailableInEmbedded
7783 public nonisolated func preconditionIsolated(
7884 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -92,7 +98,7 @@ extension Actor {
9298 }
9399}
94100
95- @available ( SwiftStdlib 5 . 9 , * )
101+ @available ( SwiftStdlib 5 . 1 , * )
96102extension GlobalActor {
97103 /// Unconditionally if the current task is executing on the serial executor of the passed in `actor`,
98104 /// and if not crash the program offering information about the executor mismatch.
@@ -109,7 +115,10 @@ extension GlobalActor {
109115 /// * In `-Ounchecked` builds, the optimizer may assume that this function is
110116 /// never called. Failure to satisfy that assumption is a serious
111117 /// programming error.
112- @available ( SwiftStdlib 5 . 9 , * )
118+ @available ( SwiftStdlib 5 . 1 , * )
119+ #if !$Embedded
120+ @backDeployed ( before: SwiftStdlib 5.9 )
121+ #endif
113122 @_unavailableInEmbedded
114123 public static func preconditionIsolated(
115124 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -122,7 +131,7 @@ extension GlobalActor {
122131// ==== -----------------------------------------------------------------------
123132// MARK: Assert executors
124133
125- @available ( SwiftStdlib 5 . 9 , * )
134+ @available ( SwiftStdlib 5 . 1 , * )
126135extension SerialExecutor {
127136 /// Performs an executor check in debug builds.
128137 ///
@@ -136,7 +145,10 @@ extension SerialExecutor {
136145 /// * In `-Ounchecked` builds, `condition` is not evaluated, but the optimizer
137146 /// may assume that it *always* evaluates to `true`. Failure to satisfy that
138147 /// 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
140152 @_unavailableInEmbedded
141153 public func assertIsolated(
142154 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -156,7 +168,7 @@ extension SerialExecutor {
156168 }
157169}
158170
159- @available ( SwiftStdlib 5 . 9 , * )
171+ @available ( SwiftStdlib 5 . 1 , * )
160172extension Actor {
161173 /// Performs an executor check in debug builds.
162174 ///
@@ -170,7 +182,10 @@ extension Actor {
170182 /// * In `-Ounchecked` builds, `condition` is not evaluated, but the optimizer
171183 /// may assume that it *always* evaluates to `true`. Failure to satisfy that
172184 /// 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
174189 @_unavailableInEmbedded
175190 public nonisolated func assertIsolated(
176191 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -191,7 +206,7 @@ extension Actor {
191206 }
192207}
193208
194- @available ( SwiftStdlib 5 . 9 , * )
209+ @available ( SwiftStdlib 5 . 1 , * )
195210extension GlobalActor {
196211 /// Performs an executor check in debug builds.
197212 ///
@@ -205,7 +220,10 @@ extension GlobalActor {
205220 /// * In `-Ounchecked` builds, `condition` is not evaluated, but the optimizer
206221 /// may assume that it *always* evaluates to `true`. Failure to satisfy that
207222 /// 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
209227 @_unavailableInEmbedded
210228 public static func assertIsolated(
211229 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -218,7 +236,7 @@ extension GlobalActor {
218236// ==== -----------------------------------------------------------------------
219237// MARK: Assume Executor
220238
221- @available ( SwiftStdlib 5 . 9 , * )
239+ @available ( SwiftStdlib 5 . 1 , * )
222240extension Actor {
223241 /// A safe way to synchronously assume that the current execution context belongs to the passed in actor.
224242 ///
@@ -233,7 +251,10 @@ extension Actor {
233251 /// if another actor uses the same serial executor--by using that actor's ``Actor/unownedExecutor``
234252 /// as its own ``Actor/unownedExecutor``--this check will succeed, as from a concurrency safety
235253 /// 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
237258 @_unavailableFromAsync ( message: " express the closure as an explicit function declared on the specified 'actor' instead " )
238259 @_unavailableInEmbedded
239260 public nonisolated func assumeIsolated< T> (
0 commit comments