minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-12-01 21:59:04 +03:00
parent a26ab1e8ff
commit 1cc3889632
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ig-types",
"version": "5.0.24",
"version": "5.0.25",
"description": "Generic JavaScript types and type extensions...",
"main": "main.js",
"scripts": {

View File

@ -200,7 +200,15 @@ object.Constructor('Queue', Array, {
&& this.state == 'running'){
this.auto_stop ?
// auto-stop...
this.stop()
(this.poling_delay ?
// wait a bit then stop if still empty...
setTimeout(function(){
that.length > 0 ?
that.__run_tasks__()
: that.stop()
}, this.poling_delay || 200)
// stop now...
: this.stop())
// pole...
: (this.poling_delay
&& setTimeout(