async.js #1

  • //
  • guest/
  • jen_bottom/
  • ember/
  • tutorial/
  • testapp/
  • node_modules/
  • workerpool/
  • examples/
  • async.js
  • View
  • Commits
  • Open Download .zip Download (512 B)
var workerpool = require('./../index');

// 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
    });
# Change User Description Committed
#1 23539 jenbottom Adding the basic code for ember test appk, created with 'ember new' command