Andy Wermke

Results 447 comments of Andy Wermke

I suppose you are trying to use threads.js in an Electron app, so it selects the node.js implementation, but you are not using it in the node process, but in...

Hey Nick. I think this is expected behavior, but the docs are lacking some information. `Thread.errors()` will yield errors, but only uncaught worker-wide errors like uncaught promise rejections. Do you...

PS: Just to be clear: In your codesandbox example (thanks for providing one!) the error **is caught**. Errors in exposed methods are always handled by threads.js. We cannot judge from...

PPS: Here is where the `Thread.errors()` errors originate from: https://github.com/andywer/threads.js/blob/cf3c1d006438eebdfcbd5b26f801c1fbc7eaa92f/src/master/spawn.ts#L86-L95 and https://github.com/andywer/threads.js/blob/cf3c1d006438eebdfcbd5b26f801c1fbc7eaa92f/src/master/spawn.ts#L120-L132

Sorry, thought I already replied to your previous comment. So `Thread.errors()` lets you subscribe to uncaught errors in workers, that means any errors thrown outside of exposed functions. Errors thrown...

@ngault Ahh, right, now I know where we left the same page! You didn't have any error handling for the observable in place. Check out my fork of your code...

Hey @Comkiled. Sorry for the late reply. Are you using an up-to-date version of TypeScript. I also just released a new patched version of threads.js as there were issues with...

Thanks for reporting! Need to look into it, but looks like a bug.

I gave it a look, but wasn't able to precisely pin the issue down. Is it possible that passing `true` to `this.pool.completed()` solves the issue (`await this.pool.completed(true)`)? The `true` makes...