[m-users.] Parallel execution in Mercury?

Volker Wysk post at volker-wysk.de
Sun Jan 13 04:58:41 AEDT 2019


Am Samstag, 12. Januar 2019, 00:43:54 CET schrieb Peter Wang:
> > There is also the `thread` module in the library, but I haven't used this
> > yet.
> This is a practical approach if you can identify coarse-grained (mostly)
> independent tasks in your program. Spin up a bunch of worker threads,
> push the tasks to the workers via a channel, wait for the workers to
> finish, and aggregate the results. Just be careful if there are any
> shared resources needed for the tasks.

Okay, thanks.

Volker




More information about the users mailing list