mirror of https://github.com/deavmi/eventy.git
Compare commits
3 Commits
e75e3f732d
...
6392c92349
Author | SHA1 | Date |
---|---|---|
Tristan B. Velloza Kildaire | 6392c92349 | |
Tristan B. Velloza Kildaire | 28d64f799e | |
Tristan B. Velloza Kildaire | cc75eefa15 |
|
@ -184,9 +184,13 @@ public final class Engine : Thread
|
||||||
/* Yield if a lock fails (prevent potential thread starvation) */
|
/* Yield if a lock fails (prevent potential thread starvation) */
|
||||||
defaultSettings.agressiveTryLock = false;
|
defaultSettings.agressiveTryLock = false;
|
||||||
|
|
||||||
/* Make the event engine loop sleep (1) and for 200ms (2) (TODO: Adjust this) */
|
// FIXME: Investigate ways to lower load average
|
||||||
defaultSettings.holdOffMode = HoldOffMode.SLEEP;
|
// /* Make the event engine loop sleep (1) and for 50ms (2) (TODO: Adjust this) */
|
||||||
defaultSettings.sleepTime = dur!("msecs")(200);
|
// defaultSettings.holdOffMode = HoldOffMode.SLEEP;
|
||||||
|
// defaultSettings.sleepTime = dur!("msecs")(50);
|
||||||
|
|
||||||
|
/* Use yeilding for most responsiveness */
|
||||||
|
defaultSettings.holdOffMode = HoldOffMode.YIELD;
|
||||||
|
|
||||||
/* Do not gracefully shutdown */
|
/* Do not gracefully shutdown */
|
||||||
defaultSettings.gracefulShutdown = false;
|
defaultSettings.gracefulShutdown = false;
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
module eventy.event;
|
module eventy.event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event
|
* Event
|
||||||
*
|
*
|
||||||
* FIXME: Rename this to `Trigger`
|
* An Event represents a trigger for a given signal(s)
|
||||||
*
|
* handlers which associate with the given typeID
|
||||||
* An Event represents a trigger for a given signal(s)
|
*
|
||||||
* handlers which associate with the given typeID
|
* It can optionally take a payload with it as well
|
||||||
*
|
*/
|
||||||
* It can optionally take a payload with it as well
|
|
||||||
*/
|
|
||||||
public class Event
|
public class Event
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -24,4 +22,6 @@ public class Event
|
||||||
|
|
||||||
ulong id;
|
ulong id;
|
||||||
ubyte[] payload;
|
ubyte[] payload;
|
||||||
|
|
||||||
|
// TODO: Remove the requirement for the payload
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
module eventy.exceptions;
|
module eventy.exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EventyException
|
||||||
|
*
|
||||||
|
* An Eventy runtime error
|
||||||
|
*/
|
||||||
public final class EventyException : Exception
|
public final class EventyException : Exception
|
||||||
{
|
{
|
||||||
this(string message)
|
this(string message)
|
||||||
|
|
Loading…
Reference in New Issue