mirror of https://github.com/deavmi/eventy.git
Added rudimentary shutdown() method
This commit is contained in:
parent
ea1e317431
commit
692660772a
|
@ -95,6 +95,8 @@ public final class Engine : Thread
|
|||
|
||||
private Duration sleepTime;
|
||||
|
||||
private bool running;
|
||||
|
||||
this()
|
||||
{
|
||||
super(&run);
|
||||
|
@ -144,7 +146,9 @@ public final class Engine : Thread
|
|||
*/
|
||||
public void run()
|
||||
{
|
||||
while(true)
|
||||
running = true;
|
||||
|
||||
while(running)
|
||||
{
|
||||
/* TODO: Implement me */
|
||||
|
||||
|
@ -198,6 +202,16 @@ public final class Engine : Thread
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the event engine
|
||||
*
|
||||
* TODO: Examine edge cases where this might not work
|
||||
*/
|
||||
public void shutdown()
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch(Signal[] set, Event e)
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue