
5 Feb
2007
5 Feb
'07
8:11 p.m.
Hello Fabien, Monday, February 5, 2007, 10:47:37 PM, you wrote:
Probably you should put it has a static local variable inside a protected function, like this:
//! The method returns a reference to the only dispatcher instance
static state_dispatcher const& get() { static state_dispatcher instance; return instance; }
The only problem here is I'm not sure how the compilers reacted when instanciating static variable inside template functions...
That's exactly what it was before. The problem is that it's not thread-safe. -- Best regards, Andrey mailto:andysem@mail.ru