I was able to get the worker thread to receive a message, but when it then calls self.postMessage it does not seem like the main thread is receiving it. I have declared the thread with:
mettimer = new Thread('./cameraworker.js');
mettimer.onMessage = this.handleMessage;
I was able to get the worker thread to receive a message, but when it then calls self.postMessage it does not seem like the main thread is receiving it. I have declared the thread with:
mettimer = new Thread('./cameraworker.js'); mettimer.onMessage = this.handleMessage;
where handleMessage is:
handleMessage = message => { console.log('recieved message'); }
In the worker file I have:
self.onmessage = (message) => {
console.log('message received'); self.postMessage(' ');
}
Am I missing something or is this a problem with the module?