Actor model & D

Ali Çehreli acehreli at yahoo.com
Tue Nov 5 07:20:57 PST 2013


On 11/05/2013 04:28 AM, Bienlein wrote:

 >       Tid worker = spawn(&workerFunc, thisTid);

Going totally off topic here, there is ownerTid in every worker's 
context. (I suspect it was a relatively recent addition.) So, there is 
no need to pass the owner's tid explicitly:

      Tid worker = spawn(&workerFunc);

Then the worker uses the available ownerTid:

      ownerTid.send(2);

I will simplify those examples.

Ali



More information about the Digitalmars-d mailing list