How to call stop from parallel foreach
jfondren
julian.fondren at gmail.com
Fri Jun 25 19:30:16 UTC 2021
On Friday, 25 June 2021 at 19:17:38 UTC, seany wrote:
> If i use `parallel(...)`it runs.
>
> If i use `prTaskPool.parallel(...`, then in the line : `auto
> prTaskPool = new TaskPool(threadCount);` it hits the error.
> Please help.
parallel() reuses a single taskPool that's only established once.
Your code creates two TaskPools per a function invocation and you
call that function in a loop.
stracing your program might again reveal the error you're hitting.
More information about the Digitalmars-d-learn
mailing list