Sharing in D

Walter Bright newshound1 at digitalmars.com
Fri Aug 1 02:00:59 PDT 2008


downs wrote:
> I am looking for a safe way to transfer ownership of a single object
> between threads.
> 
> Like, for instance, a "unique Object foo" would behave like a shared
> Object, but the compiler would treat it like a nonshared object for
> purposes of optimization, and all accesses from the outside would be
> implicitly synchronized.
> 
> This could be used for objects that really are only supposed to exist
> once, but still used in a multithreaded way.
> 
> Hope that clears things up.

Sorry, I still have no idea what you're asking for.



More information about the Digitalmars-d mailing list