On 12/4/11 4:16 PM, Andrew Wiley wrote:
So it looks like right now, message passing is copying objects, which
seems very bad. Check this out:
--------
import std.stdio;
import std.concurrency;

class Bob {
}

void main() {
        auto tid = spawn(&func);
        auto bob = new shared(Bob)();
        writeln("bob is currently at ", cast(void*)(&bob));

This is the address of the reference, not that of the object. Use cast(void*)(bob).

Andrei

Reply via email to