Skip to content

Commit 80e9fe1

Browse files
ktosocompnerd
andauthored
🍒 5.5 [Concurrency] set queue width on all non-apple platforms, not just linux (#39765)
* [Concurrency] set queue width on all non-apple platforms, not just linux * Update stdlib/public/Concurrency/GlobalExecutor.cpp Co-authored-by: Saleem Abdulrasool <[email protected]> * Update stdlib/public/Concurrency/GlobalExecutor.cpp Co-authored-by: Saleem Abdulrasool <[email protected]> Co-authored-by: Saleem Abdulrasool <[email protected]>
1 parent db15620 commit 80e9fe1

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
@@ -266,7 +266,7 @@ static constexpr size_t globalQueueCacheCount =
266266
static_cast<size_t>(JobPriority::UserInteractive) + 1;
267267
static std::atomic<dispatch_queue_t> globalQueueCache[globalQueueCacheCount];
268268

269-
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || defined(__linux__)
269+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__APPLE__)
270270
extern "C" void dispatch_queue_set_width(dispatch_queue_t dq, long width);
271271
#endif
272272

@@ -286,7 +286,7 @@ static dispatch_queue_t getGlobalQueue(JobPriority priority) {
286286
if (SWIFT_LIKELY(queue))
287287
return queue;
288288

289-
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || defined(__linux__)
289+
#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__APPLE__)
290290
const int DISPATCH_QUEUE_WIDTH_MAX_LOGICAL_CPUS = -3;
291291

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

0 commit comments

Comments
 (0)