Documentation Home >> Headers >> <jss/joining_thread.hpp> Header >> jss::joining_thread class

The jss::joining_thread class is a wrapper for a std::thread which automatically joins in the destructor if the thread is joinable.

For details on the members, see jss::joining_thread class members.

class joining_thread
    // Construction and Destruction


    template<typename Callable>
    explicit joining_thread(Callable func);

    template<typename Callable,typename Args...>
    joining_thread(Callable func,Args... args);

    // Copying and Moving
    joining_thread(joining_thread const& other) = delete;
    joining_thread(joining_thread&& other);

    joining_thread& operator=(joining_thread const& other) = delete;
    joining_thread& operator=(joining_thread&& other);

    void swap(joining_thread& other);

    void join();
    bool joinable() const;

    id get_id() const;

void swap(joining_thread& lhs,joining_thread& rhs);

#include <jss/joining_thread.hpp>

See Also