I have used Fonctionoids in make functions thread-safe which originally used static local variables in several C++ multhreading projects. Here is the link of my blog on it:
http://zhaowuluo.wordpress.com/category/c-multithreading-3/
Happy reading!
http://zhaowuluo.wordpress.com/category/c-multithreading-3/
Happy reading!