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

fix(node): wrong worker_threads.terminate() return value #23803

Merged
merged 5 commits into from
May 15, 2024

Conversation

marvinhagemeister
Copy link
Contributor

Fixes #23801

@marvinhagemeister
Copy link
Contributor Author

Just checked and Node returns 0 from .terminate().

@marvinhagemeister
Copy link
Contributor Author

Not sure about the test failures. I'm unable to reproduce them locally.

@@ -281,6 +282,7 @@ class NodeWorker extends EventEmitter {
op_host_terminate_worker(this.#id);
}
this.emit("exit", 1);
return PromiseResolve(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it return the same code as exit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to compare with node. Haven't checked what they emit yet

marvinhagemeister and others added 5 commits May 15, 2024 14:16
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Signed-off-by: Marvin Hagemeister <marvinhagemeister50@gmail.com>
@marvinhagemeister marvinhagemeister merged commit e02d0fa into main May 15, 2024
17 checks passed
@marvinhagemeister marvinhagemeister deleted the node-worker-thread-terminate-return branch May 15, 2024 15:08
bartlomieju added a commit that referenced this pull request May 16, 2024
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->

Fixes #23801

---------

Signed-off-by: Marvin Hagemeister <marvinhagemeister50@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
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.

Bug: wrong return value for node worker_thread.terminate()
2 participants