Skip to content

Instantly share code, notes, and snippets.

@othiym23
Created August 28, 2013 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save othiym23/6372181 to your computer and use it in GitHub Desktop.
Save othiym23/6372181 to your computer and use it in GitHub Desktop.
function setup(domain) {
// do whatever to capture state at the time an async function is noticed
}
function before(domain) {
// set up the environment before callback is called
}
function after(domain) {
// clean up after callback is called
}
process._addAsyncListener({setup: setup, before: before, after: after});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment