andywer / threads.js

🧵 Make web workers & worker threads as simple as a function call.
https://threads.js.org/
MIT License
3.04k stars 161 forks source link

fix: master thread message handler only logs 1 debug message per jobUID #487

Open clintonwoo opened 5 months ago

clintonwoo commented 5 months ago

Here's a pull request to fix an issue with the worker message event handler.. it's logging 1 debug message per worker event handler.

So if a user has 10 observable events from the worker that the master subscribes to it will log 10 times the same message.

Doing the debug log after filtering the event UID fixes the issue.

Would appreciate a merge and new version if you could be so kind! Thank you!

andywer commented 4 months ago

Good point!

clintonwoo commented 4 months ago

Hm seems like the CI checks are failing for an unrelated reason