File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -387,17 +387,9 @@ static bool swift_task_isCurrentExecutorImpl(SerialExecutorRef expectedExecutor)
387
387
// the expected executor however, so we need to try a bit harder before
388
388
// we fail.
389
389
390
- // Legacy special handling the main executor by detecting the main thread.
391
- //
392
- // When 'checkIsolated' is available it will perform a dispatch queue assertion
393
- // against the main queue, potentially resulting in a crash (expected).
394
- //
395
- // In legacy mode, we cannot allow crashes here, and therefore we keep the
396
- // special best-effort handling of the "main thread".
397
- if (isCurrentExecutorMode == Legacy_NoCheckIsolated_NonCrashing) {
398
- if (expectedExecutor.isMainExecutor () && isExecutingOnMainThread ()) {
399
- return true ;
400
- }
390
+ // Special handling the main executor by detecting the main thread.
391
+ if (expectedExecutor.isMainExecutor () && isExecutingOnMainThread ()) {
392
+ return true ;
401
393
}
402
394
403
395
// We cannot use 'complexEquality' as it requires two executor instances,
You can’t perform that action at this time.
0 commit comments