aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scheduler.txx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/scheduler.txx')
-rw-r--r--libbuild2/scheduler.txx3
1 files changed, 3 insertions, 0 deletions
diff --git a/libbuild2/scheduler.txx b/libbuild2/scheduler.txx
index 9cfc411..5c6b339 100644
--- a/libbuild2/scheduler.txx
+++ b/libbuild2/scheduler.txx
@@ -54,6 +54,9 @@ namespace build2
if (tq->shutdown)
throw_generic_error (ECANCELED);
+ if (tq->data == nullptr)
+ tq->data.reset (new task_data[task_queue_depth_]);
+
if (task_data* td = push (*tq))
{
// Package the task (under lock).