Skip to content

Commit ba0644c

Browse files
committed
Move priority adjustments for async task creation into the runtime.
We're not actually performing the adjustments at the moment due to an unrelated bug, and will want to perform them within `swift_task_create_common` based on inheritContext and the given priority.
1 parent 7def279 commit ba0644c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ extension Task where Failure == Never {
513513
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
514514
// Set up the job flags for a new task.
515515
var flags = TaskCreateFlags()
516-
flags.priority = priority ?? Task<Never, Never>.currentPriority._downgradeUserInteractive
516+
flags.priority = priority
517517
flags.inheritContext = true
518518
flags.copyTaskLocals = true
519519
flags.enqueueJob = true
@@ -550,7 +550,7 @@ extension Task where Failure == Error {
550550
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
551551
// Set up the job flags for a new task.
552552
var flags = TaskCreateFlags()
553-
flags.priority = priority ?? Task<Never, Never>.currentPriority._downgradeUserInteractive
553+
flags.priority = priority
554554
flags.inheritContext = true
555555
flags.copyTaskLocals = true
556556
flags.enqueueJob = true
@@ -606,7 +606,7 @@ extension Task where Failure == Never {
606606
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
607607
// Set up the job flags for a new task.
608608
var flags = TaskCreateFlags()
609-
flags.priority = priority ?? .unspecified
609+
flags.priority = priority
610610
flags.enqueueJob = true
611611

612612
// Create the asynchronous task future.
@@ -661,7 +661,7 @@ extension Task where Failure == Error {
661661
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
662662
// Set up the job flags for a new task.
663663
var flags = TaskCreateFlags()
664-
flags.priority = priority ?? .unspecified
664+
flags.priority = priority
665665
flags.enqueueJob = true
666666

667667
// Create the asynchronous task future.

0 commit comments

Comments
 (0)