#include <System.hpp>
◆ runtime_map
◆ SystemRoutineManager()
613 {
615 std::cerr << "SystemRoutineManager for module type (" << module_type << ") failed to start. Invalid module type." << std::endl;
616 }
617 }
runtime_module_type _module_type
Definition: System.hpp:698
@ RUNTIME_MODULE_MAX
Definition: System.hpp:93
References Horizon::System::RUNTIME_MODULE_MAX.
◆ find_runtime()
virtual std::shared_ptr< const runtime_map_data > Horizon::System::SystemRoutineManager::find_runtime |
( |
std::string |
name | ) |
|
|
inlinevirtual |
632 {
634 return (it !=
_runtime_map.end()) ? std::make_shared<const runtime_map_data>(it->second) : nullptr;
635 }
runtime_map _runtime_map
Definition: System.hpp:697
References _runtime_map.
◆ get_module_type()
◆ get_runtime_routine_count()
virtual int Horizon::System::SystemRoutineManager::get_runtime_routine_count |
( |
| ) |
|
|
inlinevirtual |
◆ pop()
std::shared_ptr< RuntimeContext > Horizon::System::SystemRoutineManager::pop |
( |
| ) |
|
|
inline |
654 {
656 return nullptr;
657
658 std::shared_ptr<RuntimeContext> ret;
660 return ret;
661 }
boost::lockfree::spsc_queue< std::shared_ptr< RuntimeContext >, boost::lockfree::capacity< 100 > > _system_queue
Definition: System.hpp:693
References _system_queue.
Referenced by process_queue().
◆ pop_chain()
664 {
666 return nullptr;
667
668 std::shared_ptr<RuntimeContextChain> ret;
670 return ret;
671 }
boost::lockfree::spsc_queue< std::shared_ptr< RuntimeContextChain >, boost::lockfree::capacity< 100 > > _system_queue_chain
Definition: System.hpp:694
References _system_queue_chain.
Referenced by process_queue().
◆ process_queue()
void Horizon::System::SystemRoutineManager::process_queue |
( |
| ) |
|
|
inline |
677 {
679 std::shared_ptr<RuntimeContext> context =
pop();
680 if (context != nullptr)
681 context->run();
682 }
683
685 std::shared_ptr<RuntimeContextChain> routine_chain =
pop_chain();
686 if (routine_chain != nullptr)
687 routine_chain->get_queue_manager().process();
688 }
691 }
std::shared_ptr< RuntimeContextChain > pop_chain()
Definition: System.hpp:663
std::shared_ptr< RuntimeContext > pop()
Definition: System.hpp:653
References _system_queue, _system_queue_chain, pop(), and pop_chain().
Referenced by BOOST_AUTO_TEST_CASE(), KernelComponent::system_routine_process_queue(), Kernel::system_routine_process_queue(), Horizon::Auth::AuthNetworkThread::update(), Horizon::Char::CharNetworkThread::update(), Horizon::Zone::ZoneNetworkThread::update(), Horizon::Zone::ZoneRuntime::update(), Horizon::Zone::GameLogicProcess::update(), Horizon::Zone::PersistenceManager::update(), and Horizon::Zone::ScriptManager::update().
◆ push() [1/2]
void Horizon::System::SystemRoutineManager::push |
( |
std::shared_ptr< RuntimeContext > |
seg | ) |
|
|
inline |
648 {
651 }
runtime_module_type get_module_type()
Definition: System.hpp:642
virtual void register_(runtime_module_type module_t, runtime_synchronization_method sync_t, std::shared_ptr< RuntimeContext > context)
Definition: System.hpp:619
References _system_queue, get_module_type(), and register_().
◆ push() [2/2]
void Horizon::System::SystemRoutineManager::push |
( |
std::shared_ptr< RuntimeContextChain > |
chain | ) |
|
|
inline |
◆ register_() [1/2]
◆ register_() [2/2]
626 {
627 runtime_map_data data = { module_t, sync_t, nullptr, context_chain };
628 _runtime_map.emplace(context_chain->get_uuid_string(), data);
629 }
References _runtime_map.
◆ _module_type
◆ _runtime_map
runtime_map Horizon::System::SystemRoutineManager::_runtime_map |
|
private |
◆ _system_queue
boost::lockfree::spsc_queue<std::shared_ptr<RuntimeContext>, boost::lockfree::capacity<100> > Horizon::System::SystemRoutineManager::_system_queue |
◆ _system_queue_chain
boost::lockfree::spsc_queue<std::shared_ptr<RuntimeContextChain>, boost::lockfree::capacity<100> > Horizon::System::SystemRoutineManager::_system_queue_chain |
The documentation for this class was generated from the following file: