|
OpenTTD Source
1.10.0-RC1
|
Base of all threads. More...
Go to the source code of this file.
Data Structures | |
| class | OTTDThreadExitSignal |
| Signal used for signalling we knowingly want to end the thread. More... | |
Functions | |
| void | CSleep (int milliseconds) |
| Sleep on the current thread for a defined time. More... | |
| void | SetCurrentThreadName (const char *name) |
| Name the thread this function is called on for the debugger. More... | |
| template<class TFn , class... TArgs> | |
| bool | StartNewThread (std::thread *thr, const char *name, TFn &&_Fx, TArgs &&... _Ax) |
| Start a new thread. More... | |
Base of all threads.
Definition in file thread.h.
|
inline |
Sleep on the current thread for a defined time.
| milliseconds | Time to sleep for in milliseconds. |
Definition at line 25 of file thread.h.
References SetCurrentThreadName().
Referenced by MusicDriver_ExtMidi::SetVolume().
| void SetCurrentThreadName | ( | const char * | name | ) |
|
inline |
Start a new thread.
| TFn | Type of the function to call on the thread. |
| TArgs | Type of the parameters of the thread function. |
| thr | Pointer to a thread object; may be nullptr if a detached thread is wanted. |
| name | Name of the thread. |
| _Fx | Function to call on the thread. |
| _Ax | Arguments for the thread function. |
Definition at line 48 of file thread.h.
Referenced by VideoDriver_Win32::MainLoop(), NetworkUDPQueryServer(), NetworkUDPRemoveAdvertise(), ScanNewGRFFiles(), LinkGraphJob::SpawnThread(), and TCPConnecter::TCPConnecter().