![]() |
Lumiera 0.pre.04
»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.
Static Public Attributes | |
| static lib::Depend< SteamDispatcher > | instance |
| storage for Singleton access | |
Public Member Functions | |
| bool | start (Subsys::SigTerm) |
| starting the SteamDispatcher means to start the session subsystem. | |
| bool | isRunning () |
| whether the »session subsystem« is operational. | |
| void | requestStop () noexcept |
| signal to the loop thread that it needs to terminate. | |
| void | activate () |
| activate processing of enqueued session commands. | |
| void | deactivate () |
| halt further processing of session commands | |
| void | awaitDeactivation () |
| block until the dispatcher has actually reached disabled state. | |
| void | clear () |
| discard any commands waiting in the dispatcher queue | |
| bool | empty () const |
Friends | |
| class | lib::DependencyFactory< SteamDispatcher > |
Private Member Functions | |
| void | endRunningLoopState () |
| ~SteamDispatcher () | |
| SteamDispatcher () | |
Private Attributes | |
| unique_ptr< DispatcherLoop > | runningLoop_ |
| bool | active_ {false} |
Additional Inherited Members | |
Static Public Member Functions inherited from Sync< CONF > | |
| static Monitor & | getMonitor (Sync const *forThis) |
|
private |
Definition at line 341 of file steam-dispatcher.cpp.
|
private |
Definition at line 340 of file steam-dispatcher.cpp.
| 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::active_, SteamDispatcher::endRunningLoopState(), and SteamDispatcher::runningLoop_.
Here is the call graph for this function:| 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.
References SteamDispatcher::runningLoop_.
|
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, and SteamDispatcher::runningLoop_.
| void activate | ( | ) |
activate processing of enqueued session commands.
Definition at line 430 of file steam-dispatcher.cpp.
References SteamDispatcher::active_, and SteamDispatcher::runningLoop_.
| void deactivate | ( | ) |
halt further processing of session commands
Definition at line 446 of file steam-dispatcher.cpp.
References SteamDispatcher::active_, and SteamDispatcher::runningLoop_.
| 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.
References SteamDispatcher::runningLoop_.
| void clear | ( | ) |
discard any commands waiting in the dispatcher queue
Definition at line 472 of file steam-dispatcher.cpp.
References SteamDispatcher::empty(), and SteamDispatcher::runningLoop_.
Here is the call graph for this function:| bool empty | ( | ) | const |
Definition at line 485 of file steam-dispatcher.cpp.
References SteamDispatcher::runningLoop_.
Referenced by SteamDispatcher::clear().
Here is the caller graph for this function:
|
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.
References SteamDispatcher::runningLoop_.
Referenced by SteamDispatcher::start().
Here is the caller graph for this function:
|
private |
Definition at line 80 of file steam-dispatcher.hpp.
Referenced by SteamDispatcher::activate(), SteamDispatcher::awaitDeactivation(), SteamDispatcher::clear(), SteamDispatcher::deactivate(), SteamDispatcher::empty(), SteamDispatcher::endRunningLoopState(), SteamDispatcher::isRunning(), SteamDispatcher::requestStop(), and SteamDispatcher::start().
Definition at line 81 of file steam-dispatcher.hpp.
Referenced by SteamDispatcher::activate(), SteamDispatcher::deactivate(), and SteamDispatcher::start().
|
static |
storage for Singleton access
Definition at line 84 of file steam-dispatcher.hpp.
Referenced by CommandUse2_test::check_DispatcherInvocation(), SessionSubsystem::checkRunningState(), SessionCommandFunction_test::perform_massivelyParallel(), SessionSubsystem::start(), SessionCommandFunction_test::startDispatcher(), SessionCommandFunction_test::stopDispatcher(), and SessionSubsystem::triggerShutdown().
|
friend |
Definition at line 101 of file steam-dispatcher.hpp.
Inheritance diagram for SteamDispatcher:
Collaboration diagram for SteamDispatcher: