File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,22 @@ internal func donateToGlobalExecutor(
5555@available ( SwiftStdlib 6 . 2 , * )
5656@_silgen_name ( " swift_task_getMainExecutorImpl " )
5757internal func getMainExecutor( ) -> UnownedSerialExecutor {
58- return unsafe _getMainExecutorAsSerialExecutor( )
58+ if #available( StdlibDeploymentTarget 6 . 3 , * ) {
59+ return unsafe _getMainExecutorAsSerialExecutor( )
60+ } else {
61+ fatalError ( " this should never happen " )
62+ }
5963}
6064
6165@available ( SwiftStdlib 6 . 2 , * )
6266@_silgen_name ( " swift_task_enqueueMainExecutorImpl " )
6367internal func enqueueOnMainExecutor( job unownedJob: UnownedJob ) {
6468 #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
65- MainActor . executor. enqueue ( unownedJob)
69+ if #available( StdlibDeploymentTarget 6 . 3 , * ) {
70+ MainActor . executor. enqueue ( unownedJob)
71+ } else {
72+ fatalError ( " this should never happen " )
73+ }
6674 #else
6775 fatalError ( " swift_task_enqueueMainExecutor() not supported for task-to-thread " )
6876 #endif
You can’t perform that action at this time.
0 commit comments