-
Notifications
You must be signed in to change notification settings - Fork 3.5k
node:worker_threads: improve error messages, support environmentData, emit worker event #18768
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
Merged
Merged
Changes from all commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
2723041
Emit online event before Worker entrypoint runs
8f3786d
Accept callback in MessagePort.close
2b3ae71
Merge branch 'main' into ben/worker-threads-2
bc420e4
Pass test-worker-type-check.js
354f2cc
Use more appropriate #include for errors
638c4b4
Correct receiveMessageOnPort error message
9ba5b89
Add passing test
dd7e5d4
Use defaultGlobalObject
580ca99
Merge branch 'main' into ben/worker-threads-2
b74476c
Fire worker event on process
cf5ad47
Support worker environment data
513c326
Add test-worker-abort-on-uncaught-exception-terminate.js
38b20fb
Refine error message for duplicates in transferList
288dcd0
`bun run clang-format`
190n bd5f3aa
Do not unref worker on main thread when terminated
b7c7627
Terminate the VM in Worker.requestTerminate()
2d59005
Add missing files
8c6aa4e
Handle termination exception in next tick queue
2705a7b
Use exit code 1 if Worker entry point fails to load
e857f54
Allow termination exception while fetching builtin
7b40950
Clean up exception handling in BunProcess.cpp
604ae71
Add more exception checks to JSNextTickQueue
37fae6b
Merge branch 'main' into ben/worker-threads-2
ed5966c
Fix crash on workerData with no options
5d8217f
Fix null environment data
5aeb80d
Do not propagate termination exception to event loop
91a58f4
Un-todo "worker terminating forcefully properly interrupts" and fix e…
097d298
Resolve Worker entrypoint on worker thread instead of main
741c8d9
new tests
518345b
Delete TODO
a9e6207
Rename Worker.requestTerminate -> notifyNeedTermination to align with…
67b8cb2
Fix not firing messages sent before Worker started
e3d5602
Fix expectations in worker_threads test to align with Node
9284503
Add comment
ecc3622
Use code 0 for workers terminated before they start running
1a9412c
Use right exit code for workers terminated at different times
9b68b63
Update test for behavior changes
e934134
Do not terminate worker in isMainThread test
8e411f2
WIP StatWatcher fixes
577f0c2
Fix overriding process.exit code
0abd2ef
Revert "Accept callback in MessagePort.close"
3451e49
Remove failing test
10dba91
Use threadId -1 for exited Workers
01ecf80
Fix test-worker-http2-generic-streams-terminate.js
924b87d
Merge branch 'main' into ben/worker-threads-2
f54bfd7
Do not call UDP socket error handler on termination exception
5f4b7e0
Add exception checks in evaluateCommonJSModuleOnce
4874af1
cleanup
5abdc42
Merge branch 'main' into ben/worker-threads-2
3437062
Do not call uv_library_shutdown
26c9443
Add exception checks to createNodeURLBinding
2d51c9e
Run skipped test
7d20028
Add some exception checks
3d25e86
Add exception checks
fcb73cf
Merge branch 'main' into ben/worker-threads-2
981820f
Forbid termination exception in test-timeout-behavior
8c43780
Do not expose termination exception when test times out
84dd637
empty commit to see if zig fmt action is fixed
bd686ad
Merge branch 'main' into ben/worker-threads-2
8e54de3
clean up worker_thread_check.ts
1c98754
Merge branch 'main' into ben/worker-threads-2
16e9278
Merge branch 'main' into ben/worker-threads-2
baaf33e
Undo faster termination change and remove associated tests
18c19ea
don't wait 10 seconds
d630139
delete test-worker-voluntarily-exit-followed-by-throw
6d182f3
delete test-worker-process-exit-async-module
721ac4c
delete test-worker-abort-on-uncaught-exception-terminate
59ab6b5
skip broken test
a8dc6f4
add ScriptExecutionContextIdentifier binding
5fc5c54
replace translate-c symbol instead of ptrCasting
c985ea3
error checking
84bbd9d
Merge branch 'main' into ben/worker-threads-2
35435f7
finish merge
b2cc48d
try unref
38d3978
no conflicts
97004c9
remove broken tests
ba11565
clean up fireEarlyMessages
f832301
try this
b5bdf12
Add comment
504e88e
Remove nodeWorkerObjectSymbol
9f3ff0c
Merge branch 'main' into ben/worker-threads-2
6dcc4ae
Address review feedback
bd50e62
Remove unnecessary exception check
7b0774c
Check URLs are valid
308d338
Merge branch 'main' into ben/worker-threads-2
Jarred-Sumner e74482f
Use JSBoundFunction instead of BoundEmitFunction
bed568b
Undo bindings changes
3eb6a3f
Add some exception checks
51a5f4e
Delete unnecessary overload
05ab606
Use helper methods for errors
84e6cae
Delete some exception checks
d613137
review suggestion
a588751
slop
dd8083c
Split up assertions in createNodeURLBinding
6ec45e3
Use one helper function to emit events on the next tick
a52b52a
Fix environmentData crash
f2cacbc
Add test
fe4c2e2
Merge branch 'main' into ben/worker-threads-2
725ef9f
Revert "Use helper methods for errors"
326f9e0
Fix RefPtr error and debug logs
90f6978
Fix StatWatcher errors
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.