nrkno / sofie-atem-connection

Sofie ATEM Connection: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
129 stars 36 forks source link

feat: replace threadedclass with comlink #164

Open Julusian opened 4 months ago

Julusian commented 4 months ago

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:

Status

codecov-commenter commented 4 months ago

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 :warning:
src/lib/socket-worker.ts 0.00% 7 Missing :warning:
src/lib/atemSocketChild.ts 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.