fork-async

0.0.1 • Public • Published

fork-async Build Status

run a async function in a forked process

It will properly handle uncaught errors, and use nodes built in communication channels which can send fairly large messages.

install

npm install --save fork-async

usage

you can compose colored template literals in many ways

import forkAsync from 'fork-async';

(async () => {


    let result = await forkAsync(`async (one, two, done) => {
        let Promise = require('bluebird');

        await Promise.delay(1000);

        done(one + two);
    }`, [1, 2]);

    console.log(result); // returns 3


})().catch(console.error);

method signature

forkAsync(function:String, arguments:[])

Readme

Keywords

none

Package Sidebar

Install

npm i fork-async

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • icodeforlove