node-webworker icon indicating copy to clipboard operation
node-webworker copied to clipboard

pid is undefined on .terminate() call

Open beezee opened this issue 13 years ago • 0 comments

Running node 0.4.9, terminate() calls fail at the first assertion. If I log the pid to console when it is re-set after spawn, it shows up fine. If I store it as an attribute on the worker object and try to reference it there, it always comes back undefined. Here's the code that allows me to reproduce the != fail on the first line of the terminate method

var Worker = require('webworker').Worker
var worker = new Worker(__dirname+'/worker.js');
worker.terminate();

Any thoughts?

beezee avatar Feb 24 '12 20:02 beezee