Skip to content

Conversation

@Julusian
Copy link
Member

@Julusian Julusian commented Apr 24, 2024

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:

  • The 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.
  • If the worker thread exits, or fails to start, promises fail to resolve.

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 60.93750% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 84.21%. Comparing base (cef1ef3) to head (6ff069c).

Files Patch % Lines
src/lib/atemSocket.ts 56.41% 17 Missing ⚠️
src/lib/socket-worker.ts 0.00% 7 Missing ⚠️
src/lib/atemSocketChild.ts 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
- Coverage   84.46%   84.21%   -0.26%     
==========================================
  Files         184      186       +2     
  Lines        5949     5981      +32     
  Branches      937      897      -40     
==========================================
+ Hits         5025     5037      +12     
- Misses        899      944      +45     
+ Partials       25        0      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants