File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -600,15 +600,15 @@ extension Task where Success == Never, Failure == Never {
600
600
/// If none of these exist, this property will be `nil`.
601
601
@available ( SwiftStdlib 6 . 2 , * )
602
602
@_unavailableInEmbedded
603
- public static var currentExecutor : ( any Executor ) ? {
603
+ public static var currentExecutor : any Executor {
604
604
if let activeExecutor = unsafe _getActiveExecutor( ) . asSerialExecutor ( ) {
605
605
return activeExecutor
606
606
} else if let taskExecutor = unsafe _getPreferredTaskExecutor( ) . asTaskExecutor ( ) {
607
607
return taskExecutor
608
608
} else if let taskExecutor = unsafe _getCurrentTaskExecutor( ) . asTaskExecutor ( ) {
609
609
return taskExecutor
610
610
}
611
- return nil
611
+ return defaultExecutor
612
612
}
613
613
614
614
/// Get the preferred executor for the current `Task`, if any.
You can’t perform that action at this time.
0 commit comments