Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/control/steam-dispatcher.hpp"
Guard to manage processing commands to operate on the session.
A static application facility, actually backing and implementing the »session subsystem«. Embedded within the implementation of this class is the »session loop thread« to perform any session mutation commands and to activate the Builder, which translates the session contents into a render nodes network. Also embedded herein is the implementation of steam::control::SessionCommandService
Definition at line 77 of file steam-dispatcher.hpp.
Public Member Functions | |
void | activate () |
activate processing of enqueued session commands. More... | |
void | awaitDeactivation () |
block until the dispatcher has actually reached disabled state. More... | |
void | clear () |
discard any commands waiting in the dispatcher queue | |
void | deactivate () |
halt further processing of session commands More... | |
bool | empty () const |
bool | isRunning () |
whether the »session subsystem« is operational. More... | |
void | requestStop () noexcept |
signal to the loop thread that it needs to terminate. More... | |
bool | start (Subsys::SigTerm) |
starting the SteamDispatcher means to start the session subsystem. More... | |
Static Public Attributes | |
static lib::Depend< SteamDispatcher > | instance |
storage for Singleton access | |
Friends | |
class | lib::DependencyFactory< SteamDispatcher > |
Private Member Functions | |
void | endRunningLoopState () |
Private Attributes | |
bool | active_ {false} |
unique_ptr< DispatcherLoop > | runningLoop_ |
Additional Inherited Members | |
Static Public Member Functions inherited from Sync<> | |
static Monitor & | getMonitor (Sync const *forThis) |
bool start | ( | Subsys::SigTerm | termNotification | ) |
starting the SteamDispatcher means to start the session subsystem.
false
when starting failed since it is already running... Definition at line 352 of file steam-dispatcher.cpp.
References SteamDispatcher::endRunningLoopState().
bool isRunning | ( | ) |
whether the »session subsystem« is operational.
true
if the session loop thread has been fully started and is not (yet) completely terminated. Definition at line 398 of file steam-dispatcher.cpp.
|
noexcept |
signal to the loop thread that it needs to terminate.
Definition at line 409 of file steam-dispatcher.cpp.
References ERROR_LOG_AND_IGNORE.
void activate | ( | ) |
activate processing of enqueued session commands.
Definition at line 430 of file steam-dispatcher.cpp.
void deactivate | ( | ) |
halt further processing of session commands
Definition at line 446 of file steam-dispatcher.cpp.
void awaitDeactivation | ( | ) |
block until the dispatcher has actually reached disabled state.
error::Fatal | when a deadlock due to such a recursive call can be detected |
Definition at line 462 of file steam-dispatcher.cpp.
|
private |
clean-up when leaving the session loop thread. This function is hooked up in to the termination callback, and is in fact the only one to delete the loop PImpl. We take the (outer) lock on SteamDispatcher to ensure no one commits anything to the DispatcherLoop object while being deleted. The call itself, while technically originating from within DispatcherLoop::runSessionThread(), relies solely on stack based context data and is a tail call.
Definition at line 380 of file steam-dispatcher.cpp.
Referenced by SteamDispatcher::start().