www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to task pool in vibe.d?

reply Computermatronic <computermatronic gmail.com> writes:
I'd like to create a bunch of tasks in vibe.d, then wait for them 
all to complete.

Using std.concurrency and std.parallelism this is trivial.

I could just spawn a bunch of vibe.d tasks and then iteratively 
join them, but I would think vibe.d would provide some primitives 
for task-pooling.
Jun 09 2018
parent crimaniak <crimaniak gmail.com> writes:
On Saturday, 9 June 2018 at 15:11:02 UTC, Computermatronic wrote:
 I'd like to create a bunch of tasks in vibe.d, then wait for 
 them all to complete.

 Using std.concurrency and std.parallelism this is trivial.

 I could just spawn a bunch of vibe.d tasks and then iteratively 
 join them, but I would think vibe.d would provide some 
 primitives for task-pooling.
Yes. https://vibed.org/api/vibe.core.taskpool/TaskPool
Jun 09 2018