File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -264,12 +264,12 @@ static bool isExecutingOnMainThread() {
264
264
}
265
265
266
266
JobPriority swift::swift_task_getCurrentThreadPriority () {
267
- if (isExecutingOnMainThread ())
268
- return JobPriority::UserInitiated;
269
-
270
267
#if defined(__APPLE__)
271
268
return static_cast <JobPriority>(qos_class_self ());
272
269
#else
270
+ if (isExecutingOnMainThread ())
271
+ return JobPriority::UserInitiated;
272
+
273
273
return JobPriority::Unspecified;
274
274
#endif
275
275
}
Original file line number Diff line number Diff line change @@ -493,6 +493,10 @@ public func async(
493
493
actualPriority = priority
494
494
}
495
495
496
+ let adjustedPriority = actualPriority == . userInteractive
497
+ ? . userInitiated
498
+ : actualPriority
499
+
496
500
// Set up the job flags for a new task.
497
501
var flags = Task . JobFlags ( )
498
502
flags. kind = . task
You can’t perform that action at this time.
0 commit comments