Commit Graph

54 Commits

Author SHA1 Message Date
Bryan O'Sullivan
5d849a878a worker: allow a function to be run in multiple worker processes
If we estimate that it will be worth the cost, we run the function in
multiple processes. Otherwise, we run it in-process.

Children report progress to the parent through a pipe.

Not yet implemented on Windows.
2013-02-09 15:51:32 -08:00
Bryan O'Sullivan
8ef1da44b3 worker: partition a list (of tasks) into equal-sized chunks 2013-02-09 15:51:32 -08:00
Bryan O'Sullivan
998baaf4d8 worker: estimate whether it's worth running a task in parallel
Not implemented for Windows yet.
2013-02-09 15:51:26 -08:00
Bryan O'Sullivan
46bf2f5a6f worker: count the number of CPUs
This works on the major platforms, and falls back to a safe guess of
1 elsewhere.
2013-02-09 15:22:12 -08:00