Skip to content

Commit 289e552

Browse files
authored
Merge pull request swiftlang#522 from adierking/stack-size
queue: use the default stack size on Windows
2 parents c66cb25 + 48cb14a commit 289e552

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/queue.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5769,13 +5769,8 @@ _dispatch_root_queue_poke_slow(dispatch_queue_global_t dq, int n, int floor)
57695769
#endif
57705770
do {
57715771
_dispatch_retain(dq); // released in _dispatch_worker_thread
5772-
#if DISPATCH_DEBUG
5773-
unsigned dwStackSize = 0;
5774-
#else
5775-
unsigned dwStackSize = 64 * 1024;
5776-
#endif
57775772
uintptr_t hThread = 0;
5778-
while (!(hThread = _beginthreadex(NULL, dwStackSize, _dispatch_worker_thread_thunk, dq, STACK_SIZE_PARAM_IS_A_RESERVATION, NULL))) {
5773+
while (!(hThread = _beginthreadex(NULL, /* stack_size */ 0, _dispatch_worker_thread_thunk, dq, STACK_SIZE_PARAM_IS_A_RESERVATION, NULL))) {
57795774
if (errno != EAGAIN) {
57805775
(void)dispatch_assume(hThread);
57815776
}

0 commit comments

Comments
 (0)