[m-dev.] for review: add thread fixes for pragma export in .par grade.

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Aug 26 09:24:45 AEST 2000


On 25-Aug-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> 
> When exposing a Mercury predicate to C, you need to make sure there is
> an engine for it to run in before calling it.
> 
> For single-threaded programs, we simply make sure that the engine is run
> soon after main().  But for multi-threaded programs, code written in C
> could create new threads and call Mercury using one of these threads.
> Of course the same code could be called from a thread where there is
> already a Mercury engine.
> 
> This change fixes this problem by creating a Mercury engine if and only
> if it is required.

That change looks good.

-- 
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 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list