pgriess/node-webworker — Issue #40: pid is undefined on .terminate() call
Author: beezee
Created: 2012-02-24 20:13:57+00:00
State: open

Running node 0.4.9, terminate() calls fail and the assertions. 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?