From b585dd998dc255126128d6fe4bdc73a0409d6ca0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 23 Jan 2020 13:27:12 -0500 Subject: [PATCH] throw in a little asynchrony --- lib/schedule.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/schedule.js b/lib/schedule.js index 1e93a2126..1fdef8cce 100644 --- a/lib/schedule.js +++ b/lib/schedule.js @@ -68,7 +68,6 @@ var isEmpty = function (map) { return true; }; -// XXX enforce asynchrony everywhere module.exports = function () { // every scheduler instance has its own queue var queue = WriteQueue(); @@ -111,7 +110,7 @@ module.exports = function () { if (typeof(local.waiting) !== 'function') { return void collectGarbage(); } - local.waiting(); + setTimeout(local.waiting); }); };