[m-users.] What is the threading model

Julien Fischer jfischer at opturion.com
Fri Mar 7 14:50:25 AEDT 2014

On Fri, 7 Mar 2014, Paul Bone wrote:

> On Fri, Mar 07, 2014 at 02:25:19AM +1300, ardeujho wrote:
>> What is the threading model of Mercury? Does it depend on the grades? Is
>> it native threads or some form of green threads?
> It's grade dependent, basically:
> low level C:    green threads running on a fixed number of OS threads.
> high level C:   OS threads only
> Java:           Java's threads
> C#:             C#'s threads, I think I don't really know

Yes, it uses C#'s threads.

> In the C grades you must have the .par grade component to access these
> features.

In high-level C grades you must have .par grade component.  The thread
features will work in low-level C grades without it, but you won't
(obviously) get parallel execution of threads without it.


More information about the users mailing list