Hi,
I'm reading nox source code and wondering how does nox install all the
components and how does them run.
/* Install the deployer responsible for DSOs. */
kernel->install(new Static_component_context(kernel, "built-in DSO
deployer",
boost::bind(&DSO_deployer::instantiate, kernel, lib_dirs,
_1, _2),
typeid(DSO_deployer).name(),
platform_configuration), INSTALLED);
I found the above code in nox_main.cc.
I also read the Static_component_context class's header file and .cc file.
1). Does it create a thread for each component which was parsed from the
component's json configuration file?
And waiting for eventdispatcher to dispatch some event? And if the event
handler is registed in the component's configure or install
function,this event will be handled by the components?
2). Or nox doesn't create a thread for each component.
When an event was dispatched, nox just find the event name in the
hash_map<Event, EventFilterChain> filter_chains
and the hash_map<contianer::Component_name, int> EventFilterChain and invoke
the registered handler functions in each component?
Chen Yang
2012-05-16
chenyangseamoon