Walter is right about transitive readonly - here's the alternative

Janice Caron caron800 at googlemail.com
Thu Sep 13 10:11:37 PDT 2007


On 9/13/07, Sean Kelly <sean at f4.ca> wrote:
> What if I only plan to use the class within a single thread and don't
> want to pay for the cost of a lock?

I should have added another answer...

Just because a "shared" storage class exists, doesn't mean you have to
use it. If you don't, you'll get thread-unsafe code, but if you don't
care about that, hey ho!

Of course, then you'll have to make everything non-const or it
probably won't compile!



More information about the Digitalmars-d mailing list