Threading
suggest changeSyntax
- thread()
- thread(thread&& other)
- explicit thread(Function&& func, Args&&… args)
Parameters
| Parameter | Details |
|---|---|
other |
Takes ownership of other. other does not own the thread anymore |
func |
Function to call in a separate thread |
args |
Arguments for func |
Remarks
Some notes:
- Two
std::threadobjects can never represent the same thread. - A
std::threadobject 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