🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
2.0.0

example/path/name/injection/example/module.coffee

5

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

@@ -48,3 +48,6 @@ "main": "index.js",

"sinon": "^1.12.2"
},
"optionalDependencies": {
"async": "^0.9.0"
}
}

27

README.md

@@ -10,17 +10,20 @@ # bobbin

var bobbin = require('bobbin');
var pool = bobbin.create(4); // create 4 processes; defaults to os.cpus().length
// create 4 processes; defaults to os.cpus().length
bobbin.create(4, function(err, pool) {
// to send some work (in this case concatenate two strings `left' and `right'):
// to send some work (in this case concatenate two strings `left' and `right'):
var left = 'foo', right = 'bar';
pool.run(
left, right, // you have to explicitly pass variables
function remoteWorkFunction(left, right, callback) {
callback(left + right);
},
function localCallback(result) {
assert(result === 'foobar');
}
);
var left = 'foo', right = 'bar';
pool.run(
left, right, // you have to explicitly pass variables
function remoteWorkFunction(left, right, callback) {
callback(left + right);
},
function localCallback(result) {
assert(result === 'foobar');
}
);
});
```

@@ -27,0 +30,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet