Running status should be set from within startTasky() and after starting all sub-systems

This commit is contained in:
Tristan B. Velloza Kildaire 2022-05-19 21:06:57 +02:00
parent 92d1b1b900
commit e3ecc30497
1 changed files with 13 additions and 18 deletions

View File

@ -34,34 +34,26 @@ public final class Engine : Thread
/* Set the worker function */
super(&worker);
/* TODO: Check for exceptions */
/* Create a new event engine */
evEngine = new EvEngine();
evEngine.start();
/* TODO: Check for exceptions */
/* Create a new tristanable manager */
tmanager = new Manager(socket, dur!("msecs")(100), true);
/* Start the loop */
running = true;
start();
tmanager = new Manager(socket, dur!("msecs")(100), true);
}
/**
* Starts the Tasky engine
*
* FIXME: Pivot to using this
* FIXME: This code should be private and rather called at the beginning
* of `.start()`
* Start the sub-systems
*/
public void startTasky()
private void startTasky()
{
/* Start the event engine */
//evEngine.start();
evEngine.start();
/* TODO: TManager should not start immediately either I guess */
//tmanager.start();
/* Start the tristanable queue filter */
tmanager.start();
/* Start the loop */
running = true;
}
public class TaskyEvent : Event
@ -82,6 +74,9 @@ public final class Engine : Thread
*/
private void worker()
{
/* Start all sub-systems */
startTasky();
while(running)
{
/**