feat: replace threadedclass with comlink #164
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the Contributor
This pull request is posted on behalf of myself
Type of Contribution
This is a: Code improvement
Current Behavior
We use threadedClass for managing the worker_thread used to run the connection.
This library was developed internally at superfly, and so is not very popular and has a few rough corners.
New Behavior
Use the comlink library instead. This is a simpler and smaller library, and while it looks to be lacking a bit in maintenance recently, its much higher popularity means it will likely be possible to jump to a fork which 'wins'. But also its popularity shows that maybe it is stable and good enough as it is.
Additionally, the way this library loads the worker code means it should play better with webpack, which will resolve some issues that have been reported
Testing Instructions
Other Information
This has not been tested much yet,
Known issues:
socket-worker
file should be named better, as it needs to be its own file on disk when bundled with webpack. naming it something to clarify its from atem-connection specific should be enough.Status