diff options
| author | Simon Marlow <simonmar@microsoft.com> | 2006-08-09 09:59:08 +0000 | 
|---|---|---|
| committer | Simon Marlow <simonmar@microsoft.com> | 2006-08-09 09:59:08 +0000 | 
| commit | 7b8b90403e97320661ea17920a257e0bf530c206 (patch) | |
| tree | 295e225b9c61cbd6d7ebe064da0ad902311873ce /rts/Task.c | |
| parent | 16513d4899e167d20e120c2b3907230b7ff9dd83 (diff) | |
| download | haskell-7b8b90403e97320661ea17920a257e0bf530c206.tar.gz | |
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.
Diffstat (limited to 'rts/Task.c')
| -rw-r--r-- | rts/Task.c | 10 | 
1 files changed, 0 insertions, 10 deletions
| diff --git a/rts/Task.c b/rts/Task.c index ef20c09a6e..57497e427b 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -28,8 +28,6 @@  Task *all_tasks = NULL;  static Task *task_free_list = NULL; // singly-linked  static nat taskCount; -#define DEFAULT_MAX_WORKERS 64 -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; -#else -	maxWorkers = DEFAULT_MAX_WORKERS; -#endif  	initialized = 1;  #if defined(THREADED_RTS)  	newThreadLocalKey(¤tTaskKey); @@ -264,9 +257,6 @@ startWorkerTask (Capability *cap,    OSThreadId tid;    Task *task; -  if (workerCount >= maxWorkers) { -      barf("too many workers; runaway worker creation?"); -  }    workerCount++;    // A worker always gets a fresh Task structure. | 
