From: liuwenzhe Date: Thu, 21 May 2020 07:15:55 +0000 (+0800) Subject: [style] standard fix X-Git-Tag: 1.1.0~4^2~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ae2377d3db3c0d942a60770982ec0278cfe4cc3f;p=poolifier.git [style] standard fix --- diff --git a/lib/workers.js b/lib/workers.js index 001c932a..abd60b4f 100644 --- a/lib/workers.js +++ b/lib/workers.js @@ -62,7 +62,7 @@ class ThreadWorker extends AsyncResource { } } - _runAsync(fn, value) { + _runAsync (fn, value) { fn(value.data).then(res => { this.parent.postMessage({ data: res, _id: value._id }) this.lastTask = Date.now() diff --git a/tests/workers/asyncWorker.js b/tests/workers/asyncWorker.js index b25b318f..098774e0 100644 --- a/tests/workers/asyncWorker.js +++ b/tests/workers/asyncWorker.js @@ -7,4 +7,4 @@ async function sleep (data) { }) } -module.exports = new ThreadWorker(sleep, { maxInactiveTime: 500, async: true }) \ No newline at end of file +module.exports = new ThreadWorker(sleep, { maxInactiveTime: 500, async: true })