Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP node:worker_threads fixes #18768

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft

WIP node:worker_threads fixes #18768

wants to merge 35 commits into from

Conversation

190n
Copy link
Collaborator

@190n 190n commented Apr 4, 2025

What does this PR do?

These are the changes from #18758 that caused regressions or needed deeper investigation to verify correctness:

  • Makes the online event fire right before a Worker starts running its entrypoint instead of right after (this is required behavior according to Node tests, but the way I've done it currently is breaking a lot of other Worker tests)
  • Makes MessagePort.close accept a callback (currently we just pass the callback to nextTick, instead of calling it exactly when the port is really closed)
  • Validates the first argument of the Worker constructor with the right error message
  • Fixes the error message when passing the wrong type to receiveMessageOnPort
  • Fixes the getEnvironmentData/setEnvironmentData implementation

How did you verify your code works?

Will add newly-passing Node tests and verify existing ones

@robobun
Copy link

robobun commented Apr 4, 2025

Updated 7:28 PM PT - Apr 11th, 2025

@190n, your commit ecc3622 has 11 failures in Build #14842:


🧪   try this PR locally:

bunx bun-pr 18768

@190n 190n mentioned this pull request Apr 4, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants