pgriess / node-webworker

A WebWorkers implementation for NodeJS
BSD 3-Clause "New" or "Revised" License
646 stars 84 forks source link

Better handling for terminate() being called on an initializing worker #7

Open pgriess opened 14 years ago

pgriess commented 14 years ago

There are several steps that the Worker instance has to go through before the child process is fully established: waiting for the 'listening' event; waiting for the 'connection' event, etc.

Make sure that we properly clean up state no matter where we are in the lifetime of the child process.