std::thread object associated with
a new thread of execution.
template<typename Callable,typename Args...> explicit thread(Callable func,Args... args);
func and each element
args must be
std::thread instance, and associates
it with a newly-created thread of execution. Copies or moves
into internal storage associated that persists for the lifetime
of the new thread of execution. Runs the supplied function
func on that new thread of execution
For a newly-constructed
An exception of type
std::system_error if unable
to start the new thread. Any exception thrown by copying
into internal storage.
The invocation of the constructor happens-before the execution of the supplied function on the newly-created thread of execution.
On compilers that don't support variadic templates, an overloaded set of constructors is provided that supports passing of up to 5 arguments.