Skip to content

Commit 3b5109a

Browse files
committed
Changed to setTimeout as setImmediate is no longer planned to be implemented by JS engine vendors
1 parent 9210300 commit 3b5109a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

AsyncQueue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ class AsyncQueue {
9898
this._workerCount++;
9999

100100
// Fire up worker process
101-
setImmediate(() => {
101+
setTimeout(() => {
102102
this._worker(workerData)
103103
.then(this._workerFinished)
104104
.catch(this._workerFailed);
105-
});
105+
}, 1);
106106
}
107107

108108
_workerFinished (response) {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "irrelon-async-queue",
3-
"version": "1.0.3",
2+
"name": "@irrelon/async-queue",
3+
"version": "2.0.1",
44
"description": "A simple async queue processor.",
55
"main": "AsyncQueue.js",
66
"scripts": {
@@ -15,5 +15,6 @@
1515
"bugs": {
1616
"url": "https://github.com/Irrelon/irrelon-async-queue/issues"
1717
},
18-
"homepage": "https://github.com/Irrelon/irrelon-async-queue"
18+
"homepage": "https://github.com/Irrelon/irrelon-async-queue",
19+
"private": false
1920
}

0 commit comments

Comments
 (0)