win_signal_blocker.hpp
Go to the documentation of this file.
00001 //
00002 // win_signal_blocker.hpp
00003 // ~~~~~~~~~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_DETAIL_WIN_SIGNAL_BLOCKER_HPP
00012 #define ASIO_DETAIL_WIN_SIGNAL_BLOCKER_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/detail/push_options.hpp"
00021 #include <boost/config.hpp>
00022 #include "asio/detail/pop_options.hpp"
00023 
00024 #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
00025 
00026 #include "asio/detail/noncopyable.hpp"
00027 
00028 namespace asio {
00029 namespace detail {
00030 
00031 class win_signal_blocker
00032   : private noncopyable
00033 {
00034 public:
00035   // Constructor blocks all signals for the calling thread.
00036   win_signal_blocker()
00037   {
00038     // No-op.
00039   }
00040 
00041   // Destructor restores the previous signal mask.
00042   ~win_signal_blocker()
00043   {
00044     // No-op.
00045   }
00046 
00047   // Block all signals for the calling thread.
00048   void block()
00049   {
00050     // No-op.
00051   }
00052 
00053   // Restore the previous signal mask.
00054   void unblock()
00055   {
00056     // No-op.
00057   }
00058 };
00059 
00060 } // namespace detail
00061 } // namespace asio
00062 
00063 #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
00064 
00065 #include "asio/detail/pop_options.hpp"
00066 
00067 #endif // ASIO_DETAIL_WIN_SIGNAL_BLOCKER_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:40