Skip to content

Add MessageChannel and aggressive worker termination#127

Open
scorsin-oai wants to merge 3 commits into
Snapchat:simon/260723-native-js-class-bindingsfrom
scorsin-oai:simon/260723-message-channels-workers
Open

Add MessageChannel and aggressive worker termination#127
scorsin-oai wants to merge 3 commits into
Snapchat:simon/260723-native-js-class-bindingsfrom
scorsin-oai:simon/260723-message-channels-workers

Conversation

@scorsin-oai

Copy link
Copy Markdown
Collaborator

Description

This change adds the MessageChannel and MessagePort API, modeled against how Web works.
It also makes worker.terminate() more aggressively terminate the worker. This allows worker code that runs in an infinite loop to be terminated. Note that in the JSCore impl it's not perfect because JSCore does not expose public APIs that allows us to implement this safely, so we have to rely on waiting until the JS code goes into our code during a native call.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation improvement
  • Performance optimization
  • Test improvement
  • Other (please describe)

Testing

  • Tests pass locally (bazel test //...)
  • Added/updated tests for changes (if applicable)
  • Tested on multiple platforms (iOS/Android/Web/macOS as applicable)
  • Manual testing performed (describe below)

Testing Details

Checklist

  • Code follows project style guidelines
  • Documentation updated (if needed)
  • No breaking changes (or documented in description)
  • Commit messages follow conventional format
  • No secrets, API keys, or internal URLs included

Related Issues

Additional Context

@github-actions

Copy link
Copy Markdown

Sensitive Files Detected

⚠️ Core runtime — App-wide blast radius — touches the rendering core. Must be gated.

This is an automated notice. A maintainer will review after import.

@github-actions github-actions Bot added the area/runtime Valdi runtime (C++/native) label Jul 24, 2026
@github-actions

Copy link
Copy Markdown

🎉 Bazel & CI Test Results

Test Suite Result
Snapshot Tests ✅ success
macOS: C++ & Platform Tests ✅ success
Valdi Smoke Tests ✅ success
API Surface Check ✅ success
Linux: Build & Export ✅ success
Linux: C++ Tests ✅ success
Linux: Build Compiler ✅ success

All Bazel configuration and CI tests passed!

The build system and core tooling are working correctly.

🚀 Bazel remote cache is now enabled - future builds will be faster!

Workflow: Valdi CI

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

Labels

area/runtime Valdi runtime (C++/native)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant