Passing a class instance to a thread via spawn()

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Fri Jul 19 08:23:08 PDT 2013


On Thursday, 18 July 2013 at 23:39:19 UTC, Sean Kelly wrote:
> I'd like to add move semantics of a sort which would work via 
> something very like assumeUnique.

That would be great.

> For now, cast the class to shared before sending, and cast
> away shared on receipt.  The only other option would be
> fore std.concurrency to copy the class when sent, but this
> requires serialization support.

Ahh, that works. Thanks!


More information about the Digitalmars-d-learn mailing list