std::thread::id::id (3) Linux Manual Page
std::thread::id::id – std::thread::id::id Synopsis id() noexcept; (since C++11) Default-constructs a new thread identifier. The identifier does not represent a thread. Parameters (none)
Section 3: library functions
std::thread::id::id – std::thread::id::id Synopsis id() noexcept; (since C++11) Default-constructs a new thread identifier. The identifier does not represent a thread. Parameters (none)
std::thread::id – std::thread::id Synopsis Defined in header <thread> class thread::id; (since C++11) The class thread::id is a lightweight, trivially copyable class that serves as a unique identifier of std::thread objects. Instances of this class may also hold the special distinct value that does not represent any thread. Once a thread has finished, the value of…
std::thread::hardware_concurrency – std::thread::hardware_concurrency Synopsis static unsigned int hardware_concurrency() noexcept; (since C++ 11) Returns the number of concurrent threads supported by the implementation. The value should be considered only a hint. Parameters (none) Return value Number of concurrent threads supported. If the value is not well defined or not computable, returns 0. Example // Run this…
std::thread::get_id – std::thread::get_id Synopsis std::thread::id get_id() const noexcept; (since C++11) Returns a value of std::thread::id identifying the thread associated with *this. Parameters (none) Return value A value of type std::thread::id identifying the thread associated with *this. If there is no thread associated, default constructed std::thread::id is returned. Example // Run this code #include <iostream> #include…
std::thread::detach – std::thread::detach Synopsis void detach(); (since C++ 11) Separates the thread of execution from the thread object, allowing execution to continue independently. Any allocated resources will be freed once the thread exits. After calling detach *this no longer owns any thread. Parameters (none) Return value (none) Postconditions joinable is false Exceptions std::system_error if joinable()…
std::thread – std::thread Synopsis Defined in header <thread> class thread; (since C++11) The class thread represents a_single_thread_of_execution. Threads allow multiple functions to execute concurrently. Threads begin execution immediately upon construction of the associated thread object (pending any OS scheduling delays), starting at the top-level function provided as a constructor_argument. The return value of the top-level…
std::this_thread::yield – std::this_thread::yield Synopsis Defined in header <thread> void yield() noexcept; (since C++11) Provides a hint to the implementation to reschedule the execution of threads, allowing other threads to run. Parameters (none) Return value (none) Notes The exact behavior of this function depends on the implementation, in particular on the mechanics of the OS scheduler…
std::this_thread::sleep_until – std::this_thread::sleep_until Synopsis Defined in header<thread> template <class Clock, class Duration> (since C++ 11) void sleep_until(const std::chrono::time_point<Clock, Duration> &sleep_time); Blocks the execution of the current thread until specified sleep_time has been reached. The clock tied to sleep_time is used, which means that adjustments of the clock are taken into account. Thus, the duration of…
std::this_thread::sleep_for – std::this_thread::sleep_for Synopsis Defined in header<thread> template <class Rep, class Period> (since C++ 11) void sleep_for(const std::chrono::duration<Rep, Period> &sleep_duration); Blocks the execution of the current thread for at least the specified sleep_duration. This function may block for longer than sleep_duration due to scheduling or resource contention delays. The standard recommends that a steady clock…
std::this_thread::get_id – std::this_thread::get_id Synopsis Defined in header <thread> std::thread::id get_id() noexcept; (since C++11) Returns the id of the current thread. Parameters (none) Return value id of the current thread Example // Run this code #include <iostream> #include <thread> #include <chrono> #include <mutex> std::mutex g_display_mutex; void foo() { std::thread::id this_id = std::this_thread::get_id(); g_display_mutex.lock(); std::cout << "thread…
std::this_thread – Synopsis Functions void __sleep_for (chrono::seconds, chrono::nanoseconds) thread::id get_id () noexcept template<typename _Rep , typename _Period > void sleep_for (const chrono::duration< _Rep, _Period > &__rtime) template<typename _Clock , typename _Duration > void sleep_until (const chrono::time_point< _Clock, _Duration > &__atime) void yield () noexcept Detailed Description ISO C++ 2011 entities sub-namespace for thread. 30.3.2 Namespace…
std::tgamma,std::tgammaf,std::tgammal – std::tgamma,std::tgammaf,std::tgammal Synopsis Defined in header <cmath> float tgamma ( float arg ); (1) (since C++11) float tgammaf( float arg ); double tgamma ( double arg ); (2) (since C++11) long double tgamma ( long double arg ); (3) (since C++11) long double tgammal( long double arg ); double tgamma ( IntegralType arg );…
std::terminate_handler – std::terminate_handler Synopsis Defined in header<exception> typedef void (*terminate_handler)(); std::terminate_handler is the function pointer type (pointer to function that takes no arguments and returns void), which is installed and queried by the functions std::set_terminate and std::get_terminate and called by std::terminate. The C++ implementation provides a default std::terminate_handler function, which calls std::abort(). If the null…
std::terminate – std::terminate Synopsis Defined in header <exception> void terminate(); (until C++11) [[noreturn]] void terminate() noexcept; (since C++11) std::terminate() is called by the C++ runtime when exception handling fails for any of the following reasons: 1) an exception_is_thrown and not caught (it is implementation-defined whether any stack unwinding is done in this case) 2) a…
std::tanh,std::tanhf,std::tanhl – std::tanh,std::tanhf,std::tanhl Synopsis Defined in header <cmath> float tanh ( float arg ); float tanhf( float arg ); (since C++11) double tanh ( double arg ); (1) (2) long double tanh ( long double arg ); long double tanhl( long double arg ); (3) (since C++11) double tanh ( IntegralType arg ); (4) (since…
std::tanh(std::valarray) – std::tanh(std::valarray) Synopsis Defined in header<valarray> template <class T> valarray<T> tanh(const valarray<T> &va); For each element in va computes hyperbolic tangent of the value of the element. Parameters va – value array to apply the operation to Return value Value array containing hyperbolic tangent of the values in va. Notes Unqualified function (tanh) is…
std::tanh(std::complex) – std::tanh(std::complex) Synopsis Defined in header<complex> template <class T> (since C++ 11) complex<T> tanh(const complex<T> &z); Computes complex hyperbolic tangent of a complex value z. Parameters z – complex value Return value If no errors occur, complex hyperbolic tangent of z is returned Error handling and special values Errors are reported consistent with math_errhandling…
std::tan,std::tanf,std::tanl – std::tan,std::tanf,std::tanl Synopsis Defined in header <cmath> float tan ( float arg ); float tanf( float arg ); (since C++11) double tan ( double arg ); (1) (2) long double tan ( long double arg ); long double tanl( long double arg ); (3) (since C++11) double tan ( IntegralType arg ); (4) (since…
std::tan(std::valarray) – std::tan(std::valarray) Synopsis Defined in header<valarray> template <class T> valarray<T> tan(const valarray<T> &va); For each element in va computes tangent of the value of the element. Parameters va – value array to apply the operation to Return value Value array containing tangents of the values in va. Notes Unqualified function (tan) is used to…
std::tan(std::complex) – std::tan(std::complex) Synopsis Defined in header<complex> template <class T> complex<T> tan(const complex<T> &z); Computes complex tangent of a complex value z. Parameters z – complex value Return value If no errors occur, the complex tangent of z is returned. Errors and special cases are handled as if the operation is implemented by -i *…