parallel threads stalls until all thread batches are finished.

Joe at bloow.edu Joe at bloow.edu
Tue Aug 29 10:07:03 UTC 2023


On Monday, 28 August 2023 at 22:43:56 UTC, Ali Çehreli wrote:
> On 8/28/23 15:37, Joe at bloow.edu wrote:
>
> > Basically everything is hard coded to use totalCPU's
>
> parallel() is a function that dispatches to a default TaskPool 
> object, which uses totalCPUs. It's convenient but as you say, 
> not all problems should use it.
>
> In such cases, you would create your own TaskPool object and 
> call .parallel on it:
>
>   https://youtu.be/dRORNQIB2wA?t=1611s
>
> Ali

Thanks. Seems to work. Didn't realize it was that easy ;)


More information about the Digitalmars-d-learn mailing list