boost::this_thread::disable_interruption usage confusion
Posted
by Evgenii
on Stack Overflow
See other posts from Stack Overflow
or by Evgenii
Published on 2010-05-06T11:19:45Z
Indexed on
2010/05/06
12:08 UTC
Read the original article
Hit count: 181
boost/thread/pthread/shared_mutex.hpp contains this code:
...
#include <boost/thread/detail/thread_interruption.hpp>
...
class shared_mutex
{
...
void lock_shared()
{
boost::this_thread::disable_interruption do_not_disturb;
boost::mutex::scoped_lock lk(state_change);
while(state.exclusive || state.exclusive_waiting_blocked)
{
shared_cond.wait(lk);
}
++state.shared_count;
}
...
};
but boost/thread/detail/thread_interruption.hpp does not contain implementation of disable_interruption, only the prototype.
in boost_1_42_0/libs/thread/src/pthread we don't have the implementation too
how does it work!???
© Stack Overflow or respective owner