mirror of https://github.com/deavmi/tasky.git
Running status should be set from within startTasky() and after starting all sub-systems
This commit is contained in:
parent
92d1b1b900
commit
e3ecc30497
|
@ -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)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue