mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +08:00
Breaking changes here https://github.com/mochajs/mocha/releases/tag/v8.0.0 seem fine. DISABLE_THIRD_PARTY_CHECK=Update Mocha Bug: chromium:1101784 Change-Id: Idc75c94f9a923e2b0ca13d1d1331540cb1c5d3a3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279830 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
21 lines
504 B
JavaScript
21 lines
504 B
JavaScript
var workerpool = require('..');
|
|
|
|
// create a worker pool using an the asyncWorker. This worker contains
|
|
// asynchronous functions.
|
|
var pool = workerpool.pool(__dirname + '/workers/asyncWorker.js');
|
|
|
|
|
|
pool.proxy()
|
|
.then(function (worker) {
|
|
return worker.asyncAdd(3, 4.1);
|
|
})
|
|
.then(function (result) {
|
|
console.log(result);
|
|
})
|
|
.catch(function (err) {
|
|
console.error(err);
|
|
})
|
|
.then(function () {
|
|
pool.terminate(); // terminate all workers when done
|
|
});
|