Sharing Ref Counted Containers

Michel Fortin michel.fortin at michelf.com
Thu Aug 5 03:48:53 PDT 2010


On 2010-08-05 00:05:55 -0400, Andrei Alexandrescu 
<SeeWebsiteForEmail at erdani.org> said:

>> Personally, I'd say that not being able to use a container inside a 
>> synchronized class without subverting the type system looks like a 
>> failure of the type system.
> 
> How about an insufficiency of the container library?

Well, that depends. If can you manage to make your containers operate 
with good performance (not using atomic ops) and without requiring 
casts on the user side when inside a synchronized class, then it's 
something that needs to be there in std.container. But I'm quite 
puzzled at how you could achieve this with the current type system. 
Have any clue?

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list