Threading
suggest changeSyntax
- thread()
- thread(thread&& other)
- explicit thread(Function&& func, Args&&… args)
Parameters
Parameter | Details |
——— | —————————————————————— |other
| Takes ownership of other
, other
doesn’t own the thread anymore |func
| Function to call in a seperate thread |args
| Arguments for func
|
Remarks
Some notes:
- Two
std::thread
objects can never represent the same thread. - A
std::thread
object can be in a state where it doesn’t represent any thread (i.e. after a move, after callingjoin
, etc.).
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents