5
// Copyright (c) 2003-2008 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 ASIO_DETAIL_NULL_THREAD_HPP
12
#define ASIO_DETAIL_NULL_THREAD_HPP
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
#include "asio/detail/push_options.hpp"
20
#include "asio/detail/push_options.hpp"
21
#include <boost/config.hpp>
22
#include "asio/detail/pop_options.hpp"
24
#if !defined(BOOST_HAS_THREADS)
26
#include "asio/detail/push_options.hpp"
27
#include <boost/throw_exception.hpp>
28
#include "asio/detail/pop_options.hpp"
30
#include "asio/error.hpp"
31
#include "asio/system_error.hpp"
32
#include "asio/detail/noncopyable.hpp"
41
// The purpose of the thread.
42
enum purpose { internal, external };
45
template <typename Function>
46
null_thread(Function f, purpose = internal)
49
asio::error::operation_not_supported, "thread");
50
boost::throw_exception(e);
58
// Wait for the thread to exit.
67
#endif // !defined(BOOST_HAS_THREADS)
69
#include "asio/detail/pop_options.hpp"
71
#endif // ASIO_DETAIL_NULL_THREAD_HPP