1 #ifndef BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP
2 #define BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 // (C) Copyright 2007-9 Anthony Williams
7 // (C) Copyright 2012 Vicente J. Botet Escriba
9 #include <boost/thread/detail/config.hpp>
10 #include <boost/thread/detail/delete.hpp>
12 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
18 class BOOST_THREAD_DECL disable_interruption
20 bool interruption_was_enabled;
21 friend class restore_interruption;
23 BOOST_THREAD_NO_COPYABLE(disable_interruption)
24 disable_interruption() BOOST_NOEXCEPT;
25 ~disable_interruption() BOOST_NOEXCEPT;
28 class BOOST_THREAD_DECL restore_interruption
31 BOOST_THREAD_NO_COPYABLE(restore_interruption)
32 explicit restore_interruption(disable_interruption& d) BOOST_NOEXCEPT;
33 ~restore_interruption() BOOST_NOEXCEPT;
38 #endif // BOOST_THREAD_PROVIDES_INTERRUPTIONS