Realistic 3D camera system
3D camera system components
thread.hpp
Go to the documentation of this file.
1 //
2 // thread.hpp
3 // ~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
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)
9 //
10 
11 #ifndef ASIO_THREAD_HPP
12 #define ASIO_THREAD_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
20 #include "asio/detail/thread.hpp"
21 
23 
24 namespace asio {
25 
27 
48 class thread
49  : private noncopyable
50 {
51 public:
53 
60  template <typename Function>
61  explicit thread(Function f)
62  : impl_(f)
63  {
64  }
65 
68  {
69  }
70 
72 
79  void join()
80  {
81  impl_.join();
82  }
83 
84 private:
85  detail::thread impl_;
86 };
87 
88 } // namespace asio
89 
91 
92 #endif // ASIO_THREAD_HPP
thread(Function f)
Start a new thread that executes the supplied function.
Definition: thread.hpp:61
void join()
Wait for the thread to exit.
Definition: thread.hpp:79
~thread()
Destructor.
Definition: thread.hpp:67
A simple abstraction for starting threads.
Definition: thread.hpp:48