YouCompleteMe/cpp/BoostParts/boost/thread/detail/thread_interruption.hpp

40 lines
1.2 KiB
C++
Raw Normal View History

2012-05-10 00:45:30 -04:00
#ifndef BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP
#define BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2007-9 Anthony Williams
2012-07-21 14:37:40 -04:00
// (C) Copyright 2012 Vicente J. Botet Escriba
#include <boost/thread/detail/config.hpp>
#include <boost/thread/detail/delete.hpp>
2012-05-10 00:45:30 -04:00
2013-02-13 23:03:52 -05:00
#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
2012-05-10 00:45:30 -04:00
namespace boost
{
namespace this_thread
{
class BOOST_THREAD_DECL disable_interruption
{
2012-07-21 14:37:40 -04:00
bool interruption_was_enabled;
friend class restore_interruption;
2012-05-10 00:45:30 -04:00
public:
2012-07-21 14:37:40 -04:00
BOOST_THREAD_NO_COPYABLE(disable_interruption)
disable_interruption() BOOST_NOEXCEPT;
~disable_interruption() BOOST_NOEXCEPT;
2012-05-10 00:45:30 -04:00
};
class BOOST_THREAD_DECL restore_interruption
{
public:
2012-07-21 14:37:40 -04:00
BOOST_THREAD_NO_COPYABLE(restore_interruption)
explicit restore_interruption(disable_interruption& d) BOOST_NOEXCEPT;
~restore_interruption() BOOST_NOEXCEPT;
2012-05-10 00:45:30 -04:00
};
}
}
2013-02-13 23:03:52 -05:00
#endif // BOOST_THREAD_PROVIDES_INTERRUPTIONS
#endif // header