queue container?
Steven Schveighoffer
schveiguy at yahoo.com
Wed Oct 26 09:08:25 PDT 2011
On Wed, 26 Oct 2011 10:47:10 -0400, Gor Gyolchanyan
<gor.f.gyolchanyan at 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
More information about the Digitalmars-d
mailing list