Terminate unused worker threads

Edward Z. Yang ezyang at MIT.EDU
Wed Nov 17 10:25:29 EST 2010

Excerpts from Simon Marlow's message of Wed Nov 17 06:15:46 -0500 2010:
> I suggest keeping track of the number of items in the queue.

Ok, I added a spare_workers_no field to the Capability struct.

> So I think the main thing missing is a call to workerTaskStop().


> It would be really nice if we could arrange that in the case where we 
> have too many spare workers, the extra workers exit via the same route, 
> but I suspect that might not be easy.

Do you mean, spare workers that have useful tasks to do?


More information about the Glasgow-haskell-users mailing list