Skip to content

Commit

Permalink
Fix recursion bug
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Jan 2, 2020
1 parent 7cf699f commit f19bbcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spique",
"version": "2.3.0",
"version": "2.3.1",
"description": "A spiral deque - high performance and dynamic queue size",
"main": "spique.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions spique.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const events = require("events");
const RingBuffer = require("./ringbuffer.js");

module.exports = class Spique extends events.EventEmitter {
constructor(maxItems, ringSize) {
constructor(maxItems, ringSize, _async = true) {
super();
var defaultRingSize = 1000;
ringSize = ringSize ? parseInt(ringSize) : defaultRingSize;
Expand All @@ -31,7 +31,7 @@ module.exports = class Spique extends events.EventEmitter {
var spareRing = undefined;
var rings = 1;
var items = 0;
var pending = new Spique();
var pending = _async ? new Spique(null, null, false) : null;

// allocate a new ring, or return the spare if available
function allocateRing() {
Expand Down

0 comments on commit f19bbcc

Please sign in to comment.