From ae2377d3db3c0d942a60770982ec0278cfe4cc3f Mon Sep 17 00:00:00 2001 From: liuwenzhe Date: Thu, 21 May 2020 15:15:55 +0800 Subject: [PATCH] [style] standard fix --- lib/workers.js | 2 +- tests/workers/asyncWorker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }) -- 2.34.1