From 128471870e83e073b4933da61f8a54124920309d Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 23 Nov 2020 03:15:23 +0300 Subject: [PATCH] minor fix... Signed-off-by: Alex A. Naanou --- package.json | 2 +- runner.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9c5a1ea..6222186 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-types", - "version": "4.1.0", + "version": "4.1.1", "description": "Generic JavaScript types and type extensions...", "main": "main.js", "scripts": { diff --git a/runner.js b/runner.js index f9772db..95ff7ae 100644 --- a/runner.js +++ b/runner.js @@ -169,10 +169,8 @@ module.Queue = object.Constructor('Queue', Array, { // XXX will this be collected by the GC if it is polling??? if(this.length == 0 && this.state == 'running'){ - this.trigger('queueEmpty') - - // auto-stop... this.auto_stop ? + // auto-stop... this.stop() // pole... : (this.poling_delay @@ -260,6 +258,9 @@ module.Queue = object.Constructor('Queue', Array, { } else { this.trigger('taskCompleted', task, res) } + this.length == 0 + && this.trigger('queueEmpty') + return this },