andywer / andywer/threads.js

`Thread.errors` not behaving as expected

Open
#328 9 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
TypeScript
Stars
3.5k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

Uncaught errors in a worker are not communicated to the `Thread.errors` observable on the main thread. Here is an existing threads.js example on Codesandbox, modified to throw an error in a worker and subscribe to errors on the main thread:

https://codesandbox.io/s/threadsjs-particles-forked-tgqpv?file=/src/worker.js

see line 16 of `worker.js` for the thrown error
see line 57 of `index.js` for the `Thread.errors` observable, which isn't receiving events.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.