[m-rev.] for review: shift spawn/3 etc, into the standard library
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Jan 16 11:51:51 AEDT 2007
On Tue, 16 Jan 2007, Peter Ross wrote:
> On 1/15/07, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> Shift extras/concurrency/spawn.m into a new standard library module
>> named `thread'.
>>
> Is it really useful to have the spawn primitive in the std library but
> no primitives for communicating between threads?
You can use mutables to communicate between threads at the moment since in
.par grades the access predicates have the necessary synchronization
mechanisms. (We don't have atomic updates for mutables yet, although we
have a design for them - the problem is the "nice" implementation requires
polymorphic insts and there is a bug with closures and polymorphic insts at
the moment.)
> For me the whole concurrency library should be moved in.
The modules that look useful there are mvar, semaphore and channel. I
can't see any reason not to move them into the standard library, e.g.
thread.mvar
thread.sempahore
thread.channel
The other modules left in the concurrency library seem less useful,
some like, global, just duplicate functionality that's already available
in the standard library.
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