you can use one boost::recursive_mutex