[m-dev.] moving spawn/3 and friends into stdlib

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jan 15 15:59:39 AEDT 2007


Hi,

This came up in my review comments to Peter Wang's thread local
mutable change.

I am proposing that we move some parts fo the concurrency package
from extras into the standard library.  Specifically, the bit that
will be moved is the contents of the file extras/concurrency/spawn.m.

There are a few reasons for this:

(1) Our support for concurrency has improved a lot recently and it
would be good if this particular facility were more generally available.

(2) The implementation of spawn/3 is dependent on a number of things
in the runtime; that implementation is more likely to be kept up-to-date
if it's in the standard library rather than hidden away in extras.

(3) Having spawn/3 in the standard library makes it easier to test 
features like thread local mutables, i.e the test framework doesn't
need to depend on the extras distribution.

I would like opinions on.

(1) whether this change is a good idea.
(2) what stdlib module these things should be moved to.

For (2), some suggestions are:

 	(a) add them to builtiln.m
 	(b) add a `concurrency' module to the stdlib
 	(c) add a `thread' module to the stdlib

I prefer option (c) myself.

Julien.



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



More information about the developers mailing list