![]() |
ImFusion C++ SDK 4.5.0
|
Utility classes for multi-threading. More...
Utility classes for multi-threading.
Classes | |
| class | PlaybackTimer |
| Recurring timer class that allows for playback over a range at given timestamps/intervals. More... | |
| class | StoppableThread |
| Extension of a std::thread to allow for signalling the thread to abort its execution. More... | |
| class | ThreadPool |
| Lightweight implementation of a thread pool for distributing work onto a fixed number of threads. More... | |
| class | Protected |
| Thread-safe wrapper for a shared resource protected by a mutex. More... | |
Typedefs | |
| template<class T> | |
| using | SharedProtected = std::shared_ptr<Protected<T>> |
| Convenience for storing the same Protected<T> in multiple objects. | |
Enumerations | |
| enum class | Priority { Idle , Lowest , Low , Normal , High , Highest , Critical } |
| Enumeration of thread priority levels. More... | |
Functions | |
| void | setCurrentThreadName (const std::string &threadName) |
| Sets the current thread's name to the given string so that a debugger may show it as description. | |
| std::optional< Priority > | currentThreadPriority () |
| Queries the current thread's priority from the operating system or std::nullopt if an error occurred. | |
| bool | setCurrentThreadPriority (Priority priority) |
| Sets the current thread's priority to the given value. | |
| void | runAsyncAndForget (std::function< void()> func) |
| Launches the given function in a background thread using std::thread This function will return immediately and there is no built-in way to know when func has completed. | |
| template<typename... ProtectedT, std::enable_if_t<(detail::IsProtectedV< std::remove_const_t< ProtectedT > > &&...), int > = 0> | |
| auto | lockAll (ProtectedT &... resources) |
| Locks multiple Protected<T>s simultaneously and returns a tuple of Locked handles. | |
|
strong |
Enumeration of thread priority levels.