Well, no wrapper is actually needed here: class A { int method() shared; }
void consumer() { shared a = receiveOnly!(shared A)(); } void producer() { auto cons = spawn(&consumer); send(cons, new shared A()); }
Kagamin via Digitalmars-d-learn Tue, 15 Aug 2017 03:41:28 -0700
Well, no wrapper is actually needed here: class A { int method() shared; }
void consumer() { shared a = receiveOnly!(shared A)(); } void producer() { auto cons = spawn(&consumer); send(cons, new shared A()); }