[m-dev.] thread.spawn_native

Peter Wang novalazy at gmail.com
Fri Jun 13 10:26:17 AEST 2014


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.

Peter



More information about the developers mailing list