Remove the middle man thread the JS worker thread#3577
Merged
coolreader18 merged 2 commits intomasterfrom Nov 14, 2025
Merged
Conversation
3da1329 to
ce19fd5
Compare
ce19fd5 to
d8a800c
Compare
coolreader18
approved these changes
Nov 13, 2025
Collaborator
coolreader18
left a comment
There was a problem hiding this comment.
I guess I'll approve for now, but I feel like the code could be much less janky.
- move logic `clear_all_clients` to `Instance` + use a single reply channel for v8 worker - polish `init_database` - add `CallReducerParams::from_system` - move `init_database` work into `Instance` - move `call_scheduled_reducer` to `Instance` - move `call_identity_connected` to `Instance` - move `call_identity_disconnected` + `disconnect_client` to `Instance` - make `JsInstance` methods async
cbf7947 to
c3a4969
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of Changes
This makes us go from 3 threads to 2.
The next step is to core pin the V8 worker thread.
API and ABI breaking changes
None
Expected complexity level and risk
4
Testing
Existing tests should cover this.