Commit 7b8b9040 authored by Simon Marlow's avatar Simon Marlow
Browse files

Remove the artifical cap on the number of workers

See #805.  This was here to catch bugs that resulted in an infinite
number of worker threads being created.  However, we can't put a
reasonable bound on the number of worker threads, because legitimate
programs may need to create large numbers of (probably blocked) worker
threads.  Furthermore, the OS probably has a bound on the number of
threads that a process can create in any case.

parent 16513d48
......@@ -28,8 +28,6 @@
Task *all_tasks = NULL;
static Task *task_free_list = NULL; // singly-linked
static nat taskCount;
static nat maxWorkers; // we won't create more workers than this
static nat tasksRunning;
static nat workerCount;
......@@ -58,11 +56,6 @@ initTaskManager (void)
taskCount = 0;
workerCount = 0;
tasksRunning = 0;
#if defined(THREADED_RTS)
maxWorkers = DEFAULT_MAX_WORKERS * RtsFlags.ParFlags.nNodes;
initialized = 1;
#if defined(THREADED_RTS)
......@@ -264,9 +257,6 @@ startWorkerTask (Capability *cap,
OSThreadId tid;
Task *task;
if (workerCount >= maxWorkers) {
barf("too many workers; runaway worker creation?");
// A worker always gets a fresh Task structure.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment