Skip to content

Commit e805fc4

Browse files
committed
dispatch: make the test suite pass on Windows
Certain queues (e.g. the maintenance qos queue) will not have the context setup during initialization. This will result in a failure when we try to dereference the context. This allows the test suite to pass on Windows again.
1 parent e67751f commit e805fc4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/queue.c

+2
Original file line numberDiff line numberDiff line change
@@ -6943,6 +6943,8 @@ _dispatch_root_queue_init_pthread_pool(dispatch_queue_global_t dq,
69436943
int pool_size, dispatch_priority_t pri)
69446944
{
69456945
dispatch_pthread_root_queue_context_t pqc = dq->do_ctxt;
6946+
if (pqc == NULL)
6947+
return;
69466948
int thread_pool_size = DISPATCH_WORKQ_MAX_PTHREAD_COUNT;
69476949
if (!(pri & DISPATCH_PRIORITY_FLAG_OVERCOMMIT)) {
69486950
thread_pool_size = (int32_t)dispatch_hw_config(active_cpus);

0 commit comments

Comments
 (0)