Documentation Home >> Headers >> <jss/joining_thread.hpp> Header >> jss::joining_thread >> jss::joining_thread Constructor from std::thread

Transfers ownership of a thread of execution from a std::thread object to a newly-created jss::joining_thread object.

joining_thread(std::thread&& other);

Effects:

Constructs a jss::joining_thread instance. If other has an associated thread of execution prior to the constructor invocation, that thread of execution is now associated with the newly-created jss::joining_thread object. Otherwise the newly-created jss::joining_thread object has no associated thread of execution.

Postconditions:

For a newly-constructed jss::joining_thread object x, x.get_id() is equal to the value of other.get_id() prior to the constructor invocation. other.get_id()==id().

Throws:

Nothing

Header

#include <jss/joining_thread.hpp>

See Also