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