New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bobbin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bobbin - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

CONTRIBUTING

5

package.json
{
"name": "bobbin",
"version": "0.2.1",
"version": "0.2.2",
"description": "easily spool up thread-like worker processes",

@@ -33,2 +33,5 @@ "main": "index.js",

"homepage": "https://github.com/bchociej/bobbin",
"engines": {
"node": ">=0.8.0"
},
"dependencies": {

@@ -35,0 +38,0 @@ "coffee-script": "^1.8.0",

8

README.md

@@ -10,6 +10,6 @@ # bobbin

var bobbin = require('bobbin');
var pool = bobbin.create(4); // 4 processes; defaults to os.cpus().length
var pool = bobbin.create(4); // create 4 processes; defaults to os.cpus().length
// to send some work, in this case concatenate two strings:
// to send some work (in this case concatenate two strings `left' and `right'):

@@ -36,4 +36,6 @@ var left = 'foo', right = 'bar';

1. calls to `pool.run()` are dispatched to workers in a round-robin fashion
1. calls to `pool.run()` are dispatched to workers in a round-robin fashion, though idle workers are prioritized.
2. you can't send closures to workers, so explicitly send data in the first arguments to `pool.run()`. those arguments will be passed verbatim into your work function.
3. your local callback gets called with whatever your work function calls back with.
4. to `create()` a pool, you have to be the `cluster` master, i.e. `cluster.isMaster`
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