Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fork-pool

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fork-pool

A generic child process pool for Node.js

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Fork-Pool

Build Status

Installation

npm install fork-pool

Basic Use

// Parent process
var Pool    = new pool(__dirname + '/child.js', null, null, {});
Pool.enqueue('hello', function (err, obj) {
    console.dir(obj);   // FTW!
});
// Child process
process.on('message', function (message) {
    process.send('world');
});

Parameters

  • path: Child process path (generally, you will want to prefix with "__dirname")
  • args: Child process arguments
  • options: Child process options
  • settings: Pool settings
    • name (Optional, Defaults to "fork-pool")
    • size (Optional, Defaults to # of CPUs)
    • log (Optional, Defaults to false)
    • timeout (Optional, Defaults to 30000ms)

Testing

npm test

FAQs

Package last updated on 18 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc