[m-rev.] for review: thread-local mutables
Peter Wang
wangp at students.csse.unimelb.edu.au
Thu Jan 11 10:53:44 AEDT 2007
On 2007-01-10, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> On Wed, 10 Jan 2007, Peter Wang wrote:
> >But it's a rather contrived situation,
> >as impure goals are not allowed in parallel conjuncts:
> >
> > set_var("foo", !IO),
> > (
> > set_var("bar", !IO)
> > &
> > semipure get_var(Var)
> > )
>
> Are unique arguments, like the io.states, allowed in parallel
> conjunctions anyway.
Yes.
> >Var could be "foo" or "bar" here, so nobody should be writing this code
> >anyway :-)
>
> That's what purity promises are for.
?
> I guess it all boils down to what exactly `thread_local' means for
> mutables? Does it mean that the mutable is local to the Mercury thread
> (i.e a thread explicitly created by a call to spawn/3)
Yes, that.
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