Skip to content

Commit 5ad2291

Browse files
authored
[Concurrency] Fix build in actors as locks configuration (#75004)
1 parent ab0ffe3 commit 5ad2291

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,13 @@ static NonDefaultDistributedActorImpl *asImpl(NonDefaultDistributedActor *actor)
12741274
/******************** NEW DEFAULT ACTOR IMPLEMENTATION ***********************/
12751275
/*****************************************************************************/
12761276

1277+
TaskExecutorRef TaskExecutorRef::fromTaskExecutorPreference(Job *job) {
1278+
if (auto task = dyn_cast<AsyncTask>(job)) {
1279+
return task->getPreferredTaskExecutor();
1280+
}
1281+
return TaskExecutorRef::undefined();
1282+
}
1283+
12771284
#if !SWIFT_CONCURRENCY_ACTORS_AS_LOCKS
12781285

12791286
static void traceJobQueue(DefaultActorImpl *actor, Job *first) {
@@ -1320,13 +1327,6 @@ void DefaultActorImpl::scheduleActorProcessJob(
13201327
swift_task_enqueueGlobal(job);
13211328
}
13221329

1323-
TaskExecutorRef TaskExecutorRef::fromTaskExecutorPreference(Job *job) {
1324-
if (auto task = dyn_cast<AsyncTask>(job)) {
1325-
return task->getPreferredTaskExecutor();
1326-
}
1327-
return TaskExecutorRef::undefined();
1328-
}
1329-
13301330
void DefaultActorImpl::enqueue(Job *job, JobPriority priority) {
13311331
// We can do relaxed loads here, we are just using the current head in the
13321332
// atomic state and linking that into the new job we are inserting, we don't

0 commit comments

Comments
 (0)