Boost mutex locking on same thread
snippet in lua

Boost mutex locking on same thread

user3110

{
    boost::recursive_mutex::scoped_lock lock(mutex);

    ...critical section code...

    // mutex is unlocked when 'lock' goes out of scope
}