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) */
|
||||
defaultSettings.agressiveTryLock = false;
|
||||
|
||||
/* Make the event engine loop sleep (1) and for 200ms (2) (TODO: Adjust this) */
|
||||
defaultSettings.holdOffMode = HoldOffMode.SLEEP;
|
||||
defaultSettings.sleepTime = dur!("msecs")(200);
|
||||
// FIXME: Investigate ways to lower load average
|
||||
// /* Make the event engine loop sleep (1) and for 50ms (2) (TODO: Adjust this) */
|
||||
// defaultSettings.holdOffMode = HoldOffMode.SLEEP;
|
||||
// defaultSettings.sleepTime = dur!("msecs")(50);
|
||||
|
||||
/* Use yeilding for most responsiveness */
|
||||
defaultSettings.holdOffMode = HoldOffMode.YIELD;
|
||||
|
||||
/* Do not gracefully shutdown */
|
||||
defaultSettings.gracefulShutdown = false;
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
module eventy.event;
|
||||
|
||||
/**
|
||||
* Event
|
||||
*
|
||||
* FIXME: Rename this to `Trigger`
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
/**
|
||||
* Event
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
public class Event
|
||||
{
|
||||
/**
|
||||
|
@ -24,4 +22,6 @@ public class Event
|
|||
|
||||
ulong id;
|
||||
ubyte[] payload;
|
||||
|
||||
// TODO: Remove the requirement for the payload
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
module eventy.exceptions;
|
||||
|
||||
/**
|
||||
* EventyException
|
||||
*
|
||||
* An Eventy runtime error
|
||||
*/
|
||||
public final class EventyException : Exception
|
||||
{
|
||||
this(string message)
|
||||
|
|
Loading…
Reference in New Issue