summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-06-16 14:06:33 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-06-16 14:06:33 +0000
commitc58450c0c62dc9bf74ecd5df3c07a3f1ce511e7f (patch)
tree1edf56fb7ea2e25a80136101b1cbfb66503f1a4c /rts/Task.c
parentea0c9fbe3128dfabcdbc38ed787cf76346c0a871 (diff)
downloadhaskell-c58450c0c62dc9bf74ecd5df3c07a3f1ce511e7f.tar.gz
allow the max number of workers to scale with +RTS -N
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Task.c b/rts/Task.c
index 918dc559b8..8779e292ef 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -58,7 +58,11 @@ initTaskManager (void)
taskCount = 0;
workerCount = 0;
tasksRunning = 0;
+#if defined(THREADED_RTS)
+ maxWorkers = DEFAULT_MAX_WORKERS * RtsFlags.ParFlags.nNodes;
+#else
maxWorkers = DEFAULT_MAX_WORKERS;
+#endif
initialized = 1;
#if defined(THREADED_RTS)
newThreadLocalKey(&currentTaskKey);