Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/Std/Multithreading/ThreadCreation

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

To create a thread in modern C++, instantiate std::thread, passing it a callable-object for the worker thread's entry point. To block yourself for an arbitrary amount of time, call std::this_thread::sleep_for(). To block yourself until the worker thread has finished its work, call oThread.join(). Additional information about thread creation