Skip to content

Commit 52bde17

Browse files
authored
[Concurrency] set queue width on all non-apple platforms, not just linux (#39764)
1 parent a61ce11 commit 52bde17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/GlobalExecutor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static constexpr size_t globalQueueCacheCount =
275275
static_cast<size_t>(JobPriority::UserInteractive) + 1;
276276
static std::atomic<dispatch_queue_t> globalQueueCache[globalQueueCacheCount];
277277

278-
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || defined(__linux__)
278+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__apple__)
279279
extern "C" void dispatch_queue_set_width(dispatch_queue_t dq, long width);
280280
#endif
281281

@@ -295,7 +295,7 @@ static dispatch_queue_t getGlobalQueue(JobPriority priority) {
295295
if (SWIFT_LIKELY(queue))
296296
return queue;
297297

298-
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || defined(__linux__)
298+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__apple__)
299299
const int DISPATCH_QUEUE_WIDTH_MAX_LOGICAL_CPUS = -3;
300300

301301
// Create a new cooperative concurrent queue and swap it in.

0 commit comments

Comments
 (0)