I would like to know if there would be any issue if I hold two boost::scoped_locks at the same time. The locks are locking different mutexes. Consider the following example:
void foo1()
{
boost::recursive_mutex::scoped_lock lock(mutex1);
foo2();
}
void foo2()
{
boost::recursive_mutex::scoped_lock lock(mutex2);
}
I know that this shouldn't cause a deadlock. But are there any other issues. Maybe this could cause the thread to sleep for too long?