|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
Fallback std::thread-based thread wrapper with manual stop signaling. More...
#include <ServerThread.hpp>
Collaboration diagram for Lila::ServerThread:Classes | |
| class | StopToken |
| API-compatible stop token for platforms without std::stop_token. More... | |
Public Types | |
| using | Callback = std::function< void(const StopToken &)> |
Public Member Functions | |
| ServerThread ()=default | |
| ServerThread (Callback callback) | |
| ServerThread (ServerThread &&other) noexcept | |
| ServerThread & | operator= (ServerThread &&other) noexcept |
| ServerThread (const ServerThread &)=delete | |
| ServerThread & | operator= (const ServerThread &)=delete |
| ~ServerThread () | |
| void | request_stop () noexcept |
| void | join () |
| bool | joinable () const noexcept |
Private Attributes | |
| std::thread | m_thread |
| std::shared_ptr< std::atomic< bool > > | m_stop_flag |
Fallback std::thread-based thread wrapper with manual stop signaling.
Compatible implementation for platforms where std::jthread is unavailable or broken. Provides identical interface using std::thread + std::atomic<bool> for stop signaling.
Implementation Notes:
Definition at line 119 of file ServerThread.hpp.