[m-rev.] for review: avoid a potential deadlock with io.update_globals/3

Peter Wang wangp at students.cs.mu.oz.au
Thu Aug 31 14:29:32 AEST 2006


On 2006-08-31, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> 
> On Thu, 31 Aug 2006, Peter Wang wrote:
> 
> >and it'd only be worse if multiple threads are
> >destructively updating a global data structure.
> 
> How so?

If thread A calls io.get_globals(GA, !IO), and later thread B calls
io.update_globals(Update, !IO), wouldn't the unique modes allow thread B
to use destructive update and therefore change the value of GA?

Peter
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list