ComponentThreads: Add 2 new threads: body, world; comment threads.
We add 2 new threads for handling the interoceptors and extrospector events. Also add comments explaining the purpose and role of each of these major threads.
This commit is contained in:
@@ -4,21 +4,50 @@
|
||||
namespace hk {
|
||||
|
||||
namespace director {
|
||||
/* The director is the seat of volition in Harikoff. It receives sensor
|
||||
* events from the body and world, and uses them to direct its implexors
|
||||
* to implex new menties. It then loads the menties into canvas for simulation
|
||||
* and correlation with intrins, in order to form new attrimotions and
|
||||
* menties.
|
||||
*/
|
||||
ComponentThread director;
|
||||
}
|
||||
namespace simulator {
|
||||
/* The canvas is the simulation engine in Harikoff. It receives menties and
|
||||
* simulates them in accordance with the instructions from director. It then
|
||||
* re-renders them into perception for director to get feedback.
|
||||
*/
|
||||
ComponentThread canvas;
|
||||
}
|
||||
namespace subconscious {
|
||||
/* The subconscious is the seat of memory in Harikoff. It receives menties
|
||||
* from director and stores them in memory for later recall.
|
||||
*/
|
||||
ComponentThread subconscious;
|
||||
}
|
||||
namespace body {
|
||||
/* The body is a thread that polls, processes, and sends interoceptive sensor
|
||||
* events to director. It enables these events to occur asynchronously,
|
||||
* indepdendent any actions that the other threads are taking.
|
||||
*/
|
||||
ComponentThread body;
|
||||
}
|
||||
namespace world {
|
||||
/* The world performs the same functions as the body, but for extrospective
|
||||
* sensor events.
|
||||
*/
|
||||
ComponentThread world;
|
||||
}
|
||||
|
||||
|
||||
std::unordered_map<std::thread::id, ComponentThread&>
|
||||
ComponentThread::componentThreads =
|
||||
{
|
||||
{director::director.thread.get_id(), director::director},
|
||||
{simulator::canvas.thread.get_id(), simulator::canvas},
|
||||
{subconscious::subconscious.thread.get_id(), subconscious::subconscious}
|
||||
{subconscious::subconscious.thread.get_id(), subconscious::subconscious},
|
||||
{body::body.thread.get_id(), body::body},
|
||||
{world::world.thread.get_id(), world::world}
|
||||
};
|
||||
|
||||
void ComponentThread::signalThread(std::thread::id id)
|
||||
|
||||
Reference in New Issue
Block a user