parallel threads stalls until all thread batches are finished.
Joe at bloow.edu
Joe at bloow.edu
Fri Aug 25 20:46:48 UTC 2023
On Wednesday, 23 August 2023 at 14:43:33 UTC, Sergey wrote:
> 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.
Any idea why it is behaving the way it is?
More information about the Digitalmars-d-learn
mailing list