[m-rev.] for review: thread-local mutables

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jan 10 17:52:42 AEDT 2007


Hi Peter,

A question ...

On Wed, 10 Jan 2007, Peter Wang wrote:

> 	Add a `thread_local_mutables' field to MR_Spark and update the parallel
> 	conjunction implementation to take into account thread-locals.
> 	Note that setting the value of a thread-local mutable inside a parallel
> 	conjunction is not supported.

Isn't it just a matter of ensuring that when you create a new context
as the result of a parallel conjunction that it points to the parent's
thread_local_mutable array rather than creating a copy of it?  i.e.
we should only make a copy of the array when the user explicitly requests
the creation of a separate thread via spawn/3 rather than as a result
of threads created as a result of parallel conjunctions.

...

> PS. extras/concurrency/stream.m now conflicts with library/stream.m

That module will need to be renamed.

I'll take a look at the rest of this diff later.

Julien.
--------------------------------------------------------------------------
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