2 // detail/null_signal_blocker.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
12 #define BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
20 #if !defined(BOOST_ASIO_HAS_THREADS) \
21 || defined(BOOST_ASIO_WINDOWS) \
22 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
23 || defined(__CYGWIN__) \
24 || defined(__SYMBIAN32__)
26 #include <boost/asio/detail/noncopyable.hpp>
28 #include <boost/asio/detail/push_options.hpp>
34 class null_signal_blocker
38 // Constructor blocks all signals for the calling thread.
43 // Destructor restores the previous signal mask.
44 ~null_signal_blocker()
48 // Block all signals for the calling thread.
53 // Restore the previous signal mask.
63 #include <boost/asio/detail/pop_options.hpp>
65 #endif // !defined(BOOST_ASIO_HAS_THREADS)
66 // || defined(BOOST_ASIO_WINDOWS)
67 // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
68 // || defined(__CYGWIN__)
69 // || defined(__SYMBIAN32__)
71 #endif // BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP