MCPcopy Create free account
hub / github.com/cinder/Cinder / thread

Class thread

include/asio/thread.hpp:48–86  ·  view source on GitHub ↗

A simple abstraction for starting threads. * The asio::thread class implements the smallest possible subset of the * functionality of boost::thread. It is intended to be used only for starting * a thread and waiting for it to exit. If more extensive threading * capabilities are required, you are strongly advised to use something else. * * @par Thread Safety * @e Distinct @e objects: Safe.@n

Source from the content-addressed store, hash-verified

46 * t.join(); @endcode
47 */
48class thread
49 : private noncopyable
50{
51public:
52 /// Start a new thread that executes the supplied function.
53 /**
54 * This constructor creates a new thread that will execute the given function
55 * or function object.
56 *
57 * @param f The function or function object to be run in the thread. The
58 * function signature must be: @code void f(); @endcode
59 */
60 template <typename Function>
61 explicit thread(Function f)
62 : impl_(f)
63 {
64 }
65
66 /// Destructor.
67 ~thread()
68 {
69 }
70
71 /// Wait for the thread to exit.
72 /**
73 * This function will block until the thread has exited.
74 *
75 * If this function is not called before the thread object is destroyed, the
76 * thread itself will continue to run until completion. You will, however,
77 * no longer have the ability to wait for it to exit.
78 */
79 void join()
80 {
81 impl_.join();
82 }
83
84private:
85 detail::thread impl_;
86};
87
88} // namespace asio
89

Callers 11

PhotoFetcherMethod · 0.85
MastadonHashtagStreamMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
startBusWatchMethod · 0.85
configureWatchPollingMethod · 0.85
startGMainLoopThreadMethod · 0.85
DecodeTiledLevelFunction · 0.85
DecodeChunkFunction · 0.85
EncodeTiledLevelFunction · 0.85
EncodeChunkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected