std.parallelism changes done

Michel Fortin michel.fortin at michelf.com
Thu Mar 24 08:00:14 PDT 2011


On 2011-03-24 10:43:08 -0400, dsimcha <dsimcha at yahoo.com> said:

> Sounds like a good plan.  In general, I've tried to keep the design of 
> std.parallelism simple but composable.  I have no intention of 
> re-implementing any kind of message system when std.concurrency already 
> does this well.  If this is what you want to do, though, maybe you 
> should just use std.concurrency.  I'm not sure what std.parallelism 
> would add.

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...

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list