Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parallel.js 513B

1234567891011121314
  1. var mod_dns = require('dns');
  2. var mod_util = require('util');
  3. var mod_vasync = require('../lib/vasync');
  4. console.log(mod_vasync.parallel({
  5. 'funcs': [
  6. function f1 (callback) { mod_dns.resolve('joyent.com', callback); },
  7. function f2 (callback) { mod_dns.resolve('github.com', callback); },
  8. function f3 (callback) { mod_dns.resolve('asdfaqsdfj.com', callback); }
  9. ]
  10. }, function (err, results) {
  11. console.log('error: %s', err.message);
  12. console.log('results: %s', mod_util.inspect(results, null, 3));
  13. }));