@@ -1167,8 +1167,8 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
1167
1167
#endif
1168
1168
}
1169
1169
1170
- Job *getFirstUnprioritisedJob () const { return FirstJob; }
1171
- ActiveActorStatus withFirstUnprioritisedJob (Job *firstJob) const {
1170
+ Job *getFirstUnprioritizedJob () const { return FirstJob; }
1171
+ ActiveActorStatus withFirstUnprioritizedJob (Job *firstJob) const {
1172
1172
#if SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION
1173
1173
return ActiveActorStatus (Flags, DrainLock, firstJob);
1174
1174
#else
@@ -1213,7 +1213,7 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
1213
1213
break ;
1214
1214
}
1215
1215
concurrency::trace::actor_state_changed (
1216
- actor, getFirstUnprioritisedJob (), traceState, distributedActorIsRemote,
1216
+ actor, getFirstUnprioritizedJob (), traceState, distributedActorIsRemote,
1217
1217
isMaxPriorityEscalated (), static_cast <uint8_t >(getMaxPriority ()));
1218
1218
}
1219
1219
};
@@ -1397,7 +1397,7 @@ class DefaultActorImpl
1397
1397
// / new priority
1398
1398
void enqueueStealer (Job *job, JobPriority priority);
1399
1399
1400
- // / Dequeues one job from `prioritisedJobs `.
1400
+ // / Dequeues one job from `prioritizedJobs `.
1401
1401
// / The calling thread must be holding the actor lock while calling this
1402
1402
Job *drainOne ();
1403
1403
@@ -1586,9 +1586,9 @@ void DefaultActorImpl::enqueue(Job *job, JobPriority priority) {
1586
1586
auto newState = oldState;
1587
1587
1588
1588
// Link this into the queue in the atomic state
1589
- Job *currentHead = oldState.getFirstUnprioritisedJob ();
1589
+ Job *currentHead = oldState.getFirstUnprioritizedJob ();
1590
1590
setNextJob (job, currentHead);
1591
- newState = newState.withFirstUnprioritisedJob (job);
1591
+ newState = newState.withFirstUnprioritizedJob (job);
1592
1592
1593
1593
if (oldState.isIdle ()) {
1594
1594
// Schedule the actor
@@ -1769,13 +1769,13 @@ void DefaultActorImpl::processIncomingQueue() {
1769
1769
while (true ) {
1770
1770
// If there aren't any new jobs in the incoming queue, we can return
1771
1771
// immediately without updating the status.
1772
- if (!oldState.getFirstUnprioritisedJob ()) {
1772
+ if (!oldState.getFirstUnprioritizedJob ()) {
1773
1773
return ;
1774
1774
}
1775
1775
assert (oldState.isAnyRunning ());
1776
1776
1777
1777
auto newState = oldState;
1778
- newState = newState.withFirstUnprioritisedJob (nullptr );
1778
+ newState = newState.withFirstUnprioritizedJob (nullptr );
1779
1779
1780
1780
if (_status ().compare_exchange_weak (
1781
1781
oldState, newState,
@@ -1788,7 +1788,7 @@ void DefaultActorImpl::processIncomingQueue() {
1788
1788
}
1789
1789
}
1790
1790
1791
- handleUnprioritizedJobs (oldState.getFirstUnprioritisedJob ());
1791
+ handleUnprioritizedJobs (oldState.getFirstUnprioritizedJob ());
1792
1792
}
1793
1793
1794
1794
// Called with actor lock held on current thread
@@ -1956,7 +1956,7 @@ void DefaultActorImpl::destroy() {
1956
1956
// Tasks on an actor are supposed to keep the actor alive until they start
1957
1957
// running and we can only get here if ref count of the object = 0 which means
1958
1958
// there should be no more tasks enqueued on the actor.
1959
- assert (!oldState.getFirstUnprioritisedJob () && " actor has queued jobs at destruction" );
1959
+ assert (!oldState.getFirstUnprioritizedJob () && " actor has queued jobs at destruction" );
1960
1960
1961
1961
if (oldState.isIdle ()) {
1962
1962
assert (prioritizedJobs.empty () && " actor has queued jobs at destruction" );
@@ -2064,7 +2064,7 @@ retry:;
2064
2064
}
2065
2065
2066
2066
assert (oldState.getMaxPriority () == JobPriority::Unspecified);
2067
- assert (!oldState.getFirstUnprioritisedJob ());
2067
+ assert (!oldState.getFirstUnprioritizedJob ());
2068
2068
// We cannot assert here that prioritizedJobs is empty,
2069
2069
// because lock is not held yet. Raise a flag to assert after getting the lock.
2070
2070
assertNoJobs = true ;
@@ -2083,7 +2083,7 @@ retry:;
2083
2083
// check for higher priority jobs that could have been scheduled in the
2084
2084
// meantime. And processing is more efficient when done in larger batches.
2085
2085
if (asDrainer) {
2086
- newState = newState.withFirstUnprioritisedJob (nullptr );
2086
+ newState = newState.withFirstUnprioritizedJob (nullptr );
2087
2087
}
2088
2088
2089
2089
// This needs an acquire since we are taking a lock
@@ -2096,7 +2096,7 @@ retry:;
2096
2096
}
2097
2097
traceActorStateTransition (this , oldState, newState, distributedActorIsRemote);
2098
2098
if (asDrainer) {
2099
- handleUnprioritizedJobs (oldState.getFirstUnprioritisedJob ());
2099
+ handleUnprioritizedJobs (oldState.getFirstUnprioritizedJob ());
2100
2100
}
2101
2101
return true ;
2102
2102
}
@@ -2147,7 +2147,7 @@ bool DefaultActorImpl::unlock(bool forceUnlock)
2147
2147
2148
2148
auto newState = oldState;
2149
2149
// Lock is still held at this point, so it is safe to access prioritizedJobs
2150
- if (!prioritizedJobs.empty () || oldState.getFirstUnprioritisedJob ()) {
2150
+ if (!prioritizedJobs.empty () || oldState.getFirstUnprioritizedJob ()) {
2151
2151
// There is work left to do, don't unlock the actor
2152
2152
if (!forceUnlock) {
2153
2153
SWIFT_TASK_DEBUG_LOG (" Unlock-ing actor %p failed" , this );
0 commit comments