[mercury-users] Re: Handling a timer in Mercury

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Aug 7 10:04:05 AEST 1998

On 06-Aug-1998, Ralph Becket <rwab1 at cam.sri.com> wrote:
> Just to point out the obvious, languages such as Modula3 and Java (?)
> which have an integral notion of `thread' generally get round this
> sort of thing by having mutexes as primitive datatypes (or, at least,
> part of a standard library that interfaces with the language runtime
> system).
> I know there's work happening on parallel Mercury, but is there any
> carry over/separate work on/intention to move to a threaded Mercury?

Yes, in fact that's how our implementation works.
It's built on top of Posix threads (though we have our own
Mercury threads which we multiplex between different Posix threads --
there's no one-to-one correspondence).

In addition to parallelism (e.g. independant AND-parallelism
via a parallel conjunction operator), we also plan to support
concurrency, with some kind of "fork" operation for creating
new Mercury threads, and with support for synchronization
primitives of some kind, no doubt including mutexes.

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.

More information about the users mailing list