On 27.05.2010 18:38, Michel Fortin wrote:
But it isn't thread-safe, and I
expect it would be a pain to make lazy initialization thread-safe,
although I haven't tried yet.

That has been the very point of this thread (no pun). In my other post I supplied a hack that uses two variables, shared and TLS, to reduce the cost of accessing the global. Not ideal at all but at least it requires synchronization only during the first access.

Reply via email to