[m-dev.] thread.spawn_native

Paul Bone paul at bone.id.au
Fri Jun 13 12:41:07 AEST 2014


On Fri, Jun 13, 2014 at 10:26:17AM +1000, Peter Wang wrote:
> On Thu, 12 Jun 2014 18:19:55 +1000, Michael Day <mikeday at yeslogic.com> wrote:
> > Hi Peter,
> > 
> > As an interested bystander, I like the proposal, but I don't understand 
> > this bit:
> > 
> > > Add a new annotation for foreign procs.  A call to a foreign proc with
> > > that annotation must be executed on the exclusive engine that the
> > > context originated on.  (`may_not_migrate' basically)
> > 
> > If you call thread-specific foreign procs from a thread that was 
> > launched with spawn_native, then you would have no problems even in the 
> > absence of this annotation, right? So what does the annotation actually 
> > give you?
> 
> Hi Michael,
> 
> Right.  However, if such a call occurs within a parallel conjunction
> then it could be performed on one of the parallel worker threads
> instead.  I can't think of a situation where you'd write that code
> deliberately.

Deliberate or not this affects software composability, so we need to make it
safe.


-- 
Paul Bone



More information about the developers mailing list