digitalmars.D.learn - Process Queue and Pool
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (10/10) Aug 26 2014 I'm looking for a variant of taskPool but for pids created by
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (6/7) Aug 26 2014 I guess the logic of this ProcessPool should run in its own
I'm looking for a variant of taskPool but for pids created by spawnProcess. The typical patterns it to create a set of potentially created processes in ProcessQueue together with a ProcessPool that automatically pops for the ProcessQueue when their the number of activate processes in ProcessPool has below a certain counter which is a member of ProcessPool. Maybe the Queue and the Pool should be one aggregate. The typically usage is in a build system that only keeps a limited number of processes activate at the same time. Has anybody written such a thing?
Aug 26 2014
On Tuesday, 26 August 2014 at 09:57:57 UTC, Nordlöw wrote:Has anybody written such a thing?I guess the logic of this ProcessPool should run in its own thread by default and be protected in the same way that taskPool. Of course one solution is to reuse taskPool and spawn one thread or fiber (when it becomes available in std.concurrency) for each currently active Process, right?
Aug 26 2014