Skip to content

Conversation

@chrisboulton
Copy link

Updated pull request that contains alignment fixes, unit tests and usage instructions. Strangely I wasn't able to append the pull request to the existing one.

It'd be incredibly useful to be able to tell when a worker process terminates, to for example spawn a new one, or just log the completion of the process. This patch adds an event that is raised along with the exit code from the process. It does not apply to TCP workers just yet.

Usage:

worker.addListener('close', function(code) {
    console.log('Worker child exited with ' + code);
});

Chris Boulton added 2 commits September 5, 2010 14:04
…code too. Very useful to intercept and handle quits, but not sure how to apply to TCP worker just yet
@chrisboulton
Copy link
Author

cramforce, any updated thoughts on this?

deathcap added a commit to deathcap/node-worker that referenced this pull request Jan 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant