Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Mar 30, 2011
1 parent 03e0aba commit f61b82d
Showing 1 changed file with 8 additions and 34 deletions.
42 changes: 8 additions & 34 deletions README.md
@@ -1,38 +1,12 @@
# node-worker - 0.0.1
Node Worker Pool
================

node-worker is an implementation of the WebWorker API for node.js.
http://www.whatwg.org/specs/web-workers/current-work/

## Example

var Worker = require("../lib/worker").Worker;

var worker = new Worker("worker.js");

worker.postMessage({
hello: "world"
});

worker.onmessage = function (msg) {
sys.puts(msg.hello);
};

worker.addListener("message", function (msg) {
sys.puts(msg.hello);
worker.terminate();
});

## Example Worker File

var worker = require("worker").worker;

worker.onmessage = function (msg) {
worker.postMessage({
hello: "mother"
});
};


An implementation of the web worker API with a worker pool support.

Based on the [node-worker](https://github.com/cramforce/node-worker) library by
Malte Ubl.

Examples
========

For examples, please see `test` directory.

0 comments on commit f61b82d

Please sign in to comment.