std.parallelism changes done
dsimcha
dsimcha at yahoo.com
Thu Mar 24 08:35:28 PDT 2011
On 3/24/2011 11:00 AM, Michel Fortin wrote:
>>
>
> What it adds is a task pool, where you have a fixed number of threads
> for an unlimited number of tasks. Spawning 10,000 threads because you
> have 10,000 parallelizable tasks generally isn't a good idea.
>
> That said, perhaps std.concurrency's "spawn" should have the ability to
> create tasks instead of always creating new threads...
This is a great **long-term** todo. Please file an enhancement request
in Bugzilla w.r.t. std.concurrency pooling threads so it doesn't get
lost. TaskPool would probably be a good back end for this, but IMHO any
use of TaskPool by std.concurrency should be regarded as an
implementation detail.
On the other hand, this kind of inter-module cooperation requires lots
of discussion about how it should be designed. It is also well beyond
the scope of what std.parallelism was designed to do. This will take a
long time to design and implement, have ripple effects into
std.concurrency, etc. I don't think it needs to be implemented **now**
or should hold up the vote and inclusion of std.parallelism in Phobos.
More information about the Digitalmars-d
mailing list