@FreeSlave & John Colvin

Yes, I see your point. I could still get tearing on a read. So, in the case of methods that I believe are safe (e.g. 1-line @property getters) I'll just write a shared variadic function template that uses (cast()this).foo(args) to forward to the non-shared method... and in less-safe cases, I can just add some synchronization code to the shared version. Or maybe its safer to do it the other way around, i.e. (cast(shared)this) and forward from non-shared to shared? There's not yet any established best practices for this, are there?

Reply via email to