I don't get why don't you like the idea of having a thread-safe version of methods of containers, so they would be usable as shared objects?
On Wed, Oct 26, 2011 at 8:08 PM, Steven Schveighoffer <schvei...@yahoo.com> wrote: > On Wed, 26 Oct 2011 10:47:10 -0400, Gor Gyolchanyan > <gor.f.gyolchan...@gmail.com> wrote: > >> thread-awareness of D opens up a large heap of opportunities! They are >> not utilized because of poor support. As soon as you start sharing >> something, the libraries you use start to throw tons of errors. > > I agree shared is too rough to use right now on existing libraries. But I'm > not about to worry about shared natively in collections. > > I'd hazard to guess that something could be cobbled together with a wrapper > class that synchronized a collection of shared types. Then you create this > wrapper to be able to use a shared collection. > > But that doesn't make a collection "shared-aware", it just makes it thread > safe. > >> i think the infamous __gshared is the "const" of shared. > > Most definitely __gshared is not the const of shared. It just means store a > type in the global namespace without having it be shared. It does not > respect shared, nor is it a type modifier (as const is). > > -Steve >