Skip to content

Commit 8388a92

Browse files
committed
Correct naming of "CopyThreadLocals" to "CopyTaskLocals"
1 parent dafb574 commit 8388a92

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
@@ -623,7 +623,7 @@ static AsyncTaskAndContext swift_task_create_commonImpl(
623623
}
624624

625625
// If we're supposed to copy task locals, do so now.
626-
if (taskCreateFlags.copyThreadLocals()) {
626+
if (taskCreateFlags.copyTaskLocals()) {
627627
swift_task_localsCopyTo(task);
628628
}
629629

stdlib/public/Concurrency/Task.swift

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

424424
/// Whether to copy thread locals from the currently-executing task into the
425425
/// newly-created task.
426-
var copyThreadLocals: Bool {
426+
var copyTaskLocals: Bool {
427427
get {
428428
(bits & (1 << 10)) != 0
429429
}
@@ -514,7 +514,7 @@ extension Task where Failure == Never {
514514
var flags = TaskCreateFlags()
515515
flags.priority = priority ?? Task<Never, Never>.currentPriority._downgradeUserInteractive
516516
flags.inheritContext = true
517-
flags.copyThreadLocals = true
517+
flags.copyTaskLocals = true
518518
flags.enqueueJob = true
519519

520520
// Create the asynchronous task.
@@ -548,7 +548,7 @@ extension Task where Failure == Error {
548548
var flags = TaskCreateFlags()
549549
flags.priority = priority ?? Task<Never, Never>.currentPriority._downgradeUserInteractive
550550
flags.inheritContext = true
551-
flags.copyThreadLocals = true
551+
flags.copyTaskLocals = true
552552
flags.enqueueJob = true
553553

554554
// Create the asynchronous task future.

0 commit comments

Comments
 (0)