[WIP] remove RxJS from the SegmentFetchers #1158
Merged
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.
This is yet another refacto to remove RxJS from another part of the code (a multi-year effort after #916, #962, #1042, #1127, #1091 and #1135) this time it removes it both from:
VideoThumbnailLoader
experimental tool, because it now mainly contained conversions of promise-based code to RxJS-based code to Promise-based code!Those parts were tricky to port, this branch even being initially pretty old (more than 6 months for sure, maybe much more), due to the event-rich and callback-rich nature of it (full of potential re-entrancy bugs and possible race conditions, even more now that there is Promise involved and the corresponding microtask concerns), but I think that we reached a state were it seems to work well.
It is based on the rewrite of what was previously called the
ObservablePrioritized
but is now calledTaskPrioritizer
whose work started here: #1030, one of the more tricky utils to rewrite in the RxPlayer due to a lot of synchronous and asynchronous things to consider (our interview test for senior developper is even based on it :p!).I still have to re-read everything, perhaps remove some unnecessary code, and add some tests.
As a reminder we're trying to remove reliance on RxJS globally for various reasons, which could be resumed as: