File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2201,10 +2201,13 @@ static void swift_task_deinitOnExecutorImpl(void *object,
2201
2201
// but we don't have a tail call anyway, so this does not help much here.
2202
2202
// Always create new tracking info to keep code simple.
2203
2203
ExecutorTrackingInfo trackingInfo;
2204
+
2205
+ // The only place where ExecutorTrackingInfo::getTaskExecutor() is
2206
+ // called is in swift_task_switch(), but swift_task_switch() cannot be
2207
+ // called from the synchronous code. So it does not really matter what is
2208
+ // set in the ExecutorTrackingInfo::ActiveExecutor for the duration of the
2209
+ // isolated deinit - it is unobservable anyway.
2204
2210
TaskExecutorRef taskExecutor = TaskExecutorRef::undefined ();
2205
- if (ExecutorTrackingInfo *current = ExecutorTrackingInfo::current ()) {
2206
- taskExecutor = current->getTaskExecutor ();
2207
- }
2208
2211
trackingInfo.enterAndShadow (newExecutor, taskExecutor);
2209
2212
2210
2213
// Run the work.
You can’t perform that action at this time.
0 commit comments