boost::this_thread::disable_interruption usage confusion


boost::this_thread::disable_interruption usage confusion



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!???




Consolidate multiple site files into single location

1:



Creating a PHP web page that enables you to reboot the server in Linux?
grep finds it in boost_1_42_0/libs/thread/src/pthread/thread.cpp:.
What the best multi-thread application debugger for C++ apps
    disable_interruption::disable_interruption():         interruption_was_enabled(interruption_enabled())     {         if(interruption_was_enabled)         {             detail::get_current_thread_data()->interrupt_enabled=false;         }     } 
Destructor and methods are all there too..
Build an Xcode project on a Linux machine


How do I pass a Python Variable to Bash?


read from file after calling lseek64 - Linux

2:



Basic heap usage statistics in GCC on 64-bit platform
There are 2 implementations of disable_interruption.


Segmentation Fault in prime number sieve
.
  1. boost_1_42_0/libs/thread/src/pthread/thread.cpp
  2. boost_1_42_0/libs/thread/src/win32/thread.cpp
You link against the appropriate one depending on your platform.



62 out of 100 based on 47 user ratings 772 reviews