parallel threads stalls until all thread batches are finished.

Sergey kornburn at yandex.ru
Wed Aug 23 14:43:33 UTC 2023


On Wednesday, 23 August 2023 at 13:03:36 UTC, Joe wrote:
> I use
>
> foreach(s; taskPool.parallel(files, numParallel))
> { L(s); } // L(s) represents the work to be done.

If you make for example that L function return “ok” in case file 
successfully downloaded, you can try to use TaskPool.amap.

The other option - use std.concurrency probably.




More information about the Digitalmars-d-learn mailing list