Documentation Home >> Headers >> <jss/joining_thread.hpp> Header >> jss::joining_thread >> jss::joining_thread Move-Constructor

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

joining_thread(joining_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

Note:

jss::joining_thread objects are not CopyConstructible, so there is no copy-constructor, only this move constructor

Header

#include <jss/joining_thread.hpp>

See Also