Skip to content

Commit 72909bd

Browse files
Merge pull request #38427 from varungandhi-apple/vg-workaround-priority
Further workaround for priority mishandling in runtime.
2 parents e42257e + fa40675 commit 72909bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/public/Concurrency/Task.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,12 @@ static AsyncTaskAndContext swift_task_create_commonImpl(
479479
if (currentTask)
480480
jobFlags.setPriority(currentTask->getPriority());
481481
else
482-
jobFlags.setPriority(swift_task_getCurrentThreadPriority());
482+
// FIXME: Ideally, this should be setting priority based on
483+
// swift_task_getCurrentThreadPriority(). However, that creates
484+
// priority differences which lead to different kinds of hangs
485+
// Temporarily use Unspecified to work around that.
486+
// See also: PR #37939.
487+
jobFlags.setPriority(JobPriority::Unspecified);
483488
}
484489

485490
// Figure out the size of the header.

0 commit comments

Comments
 (0)