Skip to content

Commit ee7c53d

Browse files
committed
Correct naming of "CopyThreadLocals" to "CopyTaskLocals"
1 parent 2f4fe57 commit ee7c53d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

include/swift/ABI/MetadataValues.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ class TaskCreateFlags : public FlagSet<size_t> {
20312031

20322032
Task_IsChildTask = 8,
20332033
Task_IsAsyncLetTask = 9,
2034-
Task_CopyThreadLocals = 10,
2034+
Task_CopyTaskLocals = 10,
20352035
Task_InheritContext = 11,
20362036
Task_EnqueueJob = 12,
20372037
Task_AddPendingGroupTaskUnconditionally = 13,
@@ -2048,9 +2048,9 @@ class TaskCreateFlags : public FlagSet<size_t> {
20482048
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_IsAsyncLetTask,
20492049
isAsyncLetTask,
20502050
setIsAsyncLetTask)
2051-
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_CopyThreadLocals,
2052-
copyThreadLocals,
2053-
setCopyThreadLocals)
2051+
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_CopyTaskLocals,
2052+
copyTaskLocals,
2053+
setCopyTaskLocals)
20542054
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_InheritContext,
20552055
inheritContext,
20562056
setInheritContext)

stdlib/public/Concurrency/Task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static AsyncTaskAndContext swift_task_create_commonImpl(
616616
}
617617

618618
// If we're supposed to copy task locals, do so now.
619-
if (taskCreateFlags.copyThreadLocals()) {
619+
if (taskCreateFlags.copyTaskLocals()) {
620620
swift_task_localsCopyTo(task);
621621
}
622622

stdlib/public/Concurrency/Task.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ struct TaskCreateFlags {
451451

452452
/// Whether to copy thread locals from the currently-executing task into the
453453
/// newly-created task.
454-
var copyThreadLocals: Bool {
454+
var copyTaskLocals: Bool {
455455
get {
456456
(bits & (1 << 10)) != 0
457457
}
@@ -542,7 +542,7 @@ extension Task where Failure == Never {
542542
var flags = TaskCreateFlags()
543543
flags.priority = priority ?? Task<Never, Never>.currentPriority._downgradeUserInteractive
544544
flags.inheritContext = true
545-
flags.copyThreadLocals = true
545+
flags.copyTaskLocals = true
546546
flags.enqueueJob = true
547547

548548
// Create the asynchronous task.
@@ -576,7 +576,7 @@ extension Task where Failure == Error {
576576
var flags = TaskCreateFlags()
577577
flags.priority = priority ?? Task<Never, Never>.currentPriority._downgradeUserInteractive
578578
flags.inheritContext = true
579-
flags.copyThreadLocals = true
579+
flags.copyTaskLocals = true
580580
flags.enqueueJob = true
581581

582582
// Create the asynchronous task future.

0 commit comments

Comments
 (0)