diff options
Diffstat (limited to 'lib/queue.js')
-rw-r--r-- | lib/queue.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/queue.js b/lib/queue.js index 5666843..0f17cd9 100644 --- a/lib/queue.js +++ b/lib/queue.js @@ -1,4 +1,5 @@ import queue from './internal/queue'; +import wrapAsync from './internal/wrapAsync'; /** * A queue of tasks for the worker function to complete. @@ -101,7 +102,8 @@ import queue from './internal/queue'; * }); */ export default function (worker, concurrency) { + var _worker = wrapAsync(worker); return queue(function (items, cb) { - worker(items[0], cb); + _worker(items[0], cb); }, concurrency, 1); } |