Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Synopsis

#include <boost/thread/thread.hpp>

namespace boost
{
  class thread;
  void swap(thread& lhs,thread& rhs) noexcept;

  namespace this_thread
  {
    thread::id get_id() noexcept;
    template<typename TimeDuration>
    void yield() noexcept;
    template <class Clock, class Duration>
    void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
    template <class Rep, class Period>
    void sleep_for(const chrono::duration<Rep, Period>& rel_time);
    namespace no_interruption_point  // EXTENSION
    {
    	template <class Clock, class Duration>
    	void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
    	template <class Rep, class Period>
    	void sleep_for(const chrono::duration<Rep, Period>& rel_time);
    }
    template<typename Callable>
    void at_thread_exit(Callable func); // EXTENSION

    void interruption_point(); // EXTENSION
    bool interruption_requested() noexcept; // EXTENSION
    bool interruption_enabled() noexcept; // EXTENSION 
    class disable_interruption; // EXTENSION
    class restore_interruption; // EXTENSION

  #if defined BOOST_THREAD_USES_DATETIME
    template <TimeDuration>
    void sleep(TimeDuration const& rel_time);  // DEPRECATED
    void sleep(system_time const& abs_time); // DEPRECATED
  #endif
  }
  class thread_group; // EXTENSION

}

PrevUpHomeNext