thread::id

Summary

Unique identifier for a thread.

Syntax

class thread::id;

Header

#include "tbb/compat/thread"

Description

A thread::id is an identifier value for a thread that remains unique over the thread's lifetime. A special value thread::id() represents no thread of execution. The instances are totally ordered.

Members

namespace std {
    class thread::id {
    public:
        id();

        template<typename charT, typename traits>
        friend std::basic_ostream<charT, traits>& 
            operator<< (std::basic_ostream<charT, traits> &out, thread::id id)

        friend bool operator==(thread::id x, thread::id y);
        friend bool operator!=(thread::id x, thread::id y);
        friend bool operator<(thread::id x, thread::id y);
        friend bool operator<=(thread::id x, thread::id y);
        friend bool operator>(thread::id x, thread::id y);
        friend bool operator>=(thread::id x, thread::id y);

        friend size_t tbb_hasher( const thread::id& id );
    };
}
Related information
For more complete information about compiler optimizations, see our Optimization Notice.