|
uvw
1.15.0
|
#include <thread.hpp>


Public Member Functions | |
| bool | run () noexcept |
| Creates a new thread. More... | |
| bool | run (Flags< Options > opts, std::size_t stack={}) noexcept |
| Creates a new thread. More... | |
| bool | join () noexcept |
| Joins with a terminated thread. More... | |
Public Member Functions inherited from uvw::UnderlyingType< Thread, uv_thread_t > | |
| Loop & | loop () const noexcept |
| Gets the loop from which the resource was originated. More... | |
| const uv_thread_t * | raw () const noexcept |
| Gets the underlying raw data structure. More... | |
| uv_thread_t * | raw () noexcept |
| Gets the underlying raw data structure. More... | |
Static Public Member Functions | |
| static Type | self () noexcept |
| Obtains the identifier of the calling thread. More... | |
| static bool | equal (const Thread &tl, const Thread &tr) noexcept |
| Compares thread by means of their identifiers. More... | |
Static Public Member Functions inherited from uvw::UnderlyingType< Thread, uv_thread_t > | |
| static std::shared_ptr< Thread > | create (Args &&... args) |
| Creates a new resource of the given type. More... | |
The Thread wrapper.
To create a Thread through a Loop, arguments follow:
std::function<void(std::shared_ptr<void>)>.std::shared_ptr<void>. Definition at line 48 of file thread.hpp.
Compares thread by means of their identifiers.
| tl | A valid instance of a thread. |
| tr | A valid instance of a thread. |
Definition at line 79 of file thread.hpp.
|
inlinenoexcept |
Joins with a terminated thread.
Definition at line 117 of file thread.hpp.
|
inlinenoexcept |
Creates a new thread.
Definition at line 91 of file thread.hpp.
|
inlinenoexcept |
Creates a new thread.
Available flags are:
Thread::Options::THREAD_NO_FLAGS: no flags set.Thread::Options::THREAD_HAS_STACK_SIZE: if set, stack specifies a stack size for the new thread. 0 indicates that the default value should be used (it behaves as if the flag was not set). Other values will be rounded up to the nearest page boundary.Definition at line 108 of file thread.hpp.
|
inlinestaticnoexcept |
Obtains the identifier of the calling thread.
Definition at line 69 of file thread.hpp.
1.8.13