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