joyent/node — pull request #5806 by rvagg (2013-07-06 03:09:21+00:00)
Title: doc: add asynchronous execution example

People keep asking for an async addons example, so I made one. I avoided doing actual I/O to reduce the complexity a little and went with a Monte Carlo π approximation that can be performed either synchronously or asynchronously.

The code is available here if you want to see it in clearer form: https://github.com/rvagg/node-addon-examples/tree/v0.11/9_async_work

Whaddya reckon?