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
// import opq | |
const Queue = require('opq'); | |
// below we create a new client to the queue, | |
// and create the queue on the filesystem if it does | |
// not exist. the port is used by Live-Mutex; | |
// fp is our queue filepath | |
const q = new Queue({ |
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
// asynchronous constructor example, | |
// like always do not explictly return anything from the constructor | |
function Queue(){ | |
this.ready = false; | |
let callable = true; | |
let ee = new EE(); // new event emitter |
NewerOlder