Implement JsValueStore for SharedArrayBuffer and postMessage#4417
Merged
hansl merged 15 commits intoboa-dev:mainfrom Sep 22, 2025
Merged
Implement JsValueStore for SharedArrayBuffer and postMessage#4417hansl merged 15 commits intoboa-dev:mainfrom
JsValueStore for SharedArrayBuffer and postMessage#4417hansl merged 15 commits intoboa-dev:mainfrom
Conversation
Prior to this PR, `run_jobs()` would block as long as there would be timeout jobs, even if they were in the future. A good example is using `setInterval` would run an infinite loop in `run_jobs()`. This PR unblock `run_jobs()` when the jobs do not need to be run right now. The new tests would infinite loop prior to this PR.
As well as two tests; 1. `postMessage` is in the same context as `onMessageQueue` 2. two threads have their own context and send a message from one to the other.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4417 +/- ##
==========================================
+ Coverage 47.24% 51.37% +4.13%
==========================================
Files 476 504 +28
Lines 46892 51361 +4469
==========================================
+ Hits 22154 26389 +4235
- Misses 24738 24972 +234 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nekevss
approved these changes
Sep 22, 2025
Member
nekevss
left a comment
There was a problem hiding this comment.
Looks good overall! Nice work :)
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.
This adds support for creating a
JsValueStorewith aSharedArrayBufferin it (includingTypedArraypointing to a SAB), and add an implementation ofpostMessagethat sends messages from JavaScript to a handler (normally another BoaContext).As well as two tests;
postMessageis in the same context asonMessageQueue