This repository has been archived by the owner on Feb 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2216 from askmike/pre-v0.6
Release v0.6.0
- Loading branch information
Showing
218 changed files
with
25,660 additions
and
4,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- "8.0.0" | ||
- "8.11.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Gekko uses a custom event emitter within the GekkoStream (the plugins) to guarantee | ||
// the correct order of events that are triggered by eachother. Turns sync events from | ||
// LIFO into a FIFO stack based model. | ||
// | ||
// More details here: https://forum.gekko.wizb.it/thread-56579.html | ||
|
||
const util = require('util'); | ||
const events = require('events'); | ||
const NativeEventEmitter = events.EventEmitter; | ||
|
||
const GekkoEventEmitter = function() { | ||
NativeEventEmitter.call(this); | ||
this.defferedEvents = []; | ||
} | ||
|
||
util.inherits(GekkoEventEmitter, NativeEventEmitter); | ||
|
||
// push to stack | ||
GekkoEventEmitter.prototype.deferredEmit = function(name, payload) { | ||
this.defferedEvents.push({name, payload}); | ||
} | ||
|
||
// resolve FIFO | ||
GekkoEventEmitter.prototype.broadcastDeferredEmit = function() { | ||
if(this.defferedEvents.length === 0) | ||
return false; | ||
|
||
const event = this.defferedEvents.shift(); | ||
|
||
this.emit(event.name, event.payload); | ||
return true; | ||
} | ||
|
||
module.exports = GekkoEventEmitter; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.