You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .terminate() method is supposed to return a Promise, see https://nodejs.org/api/worker_threads.html#workerterminate , but we return undefined instead. This is one of the reason the tinypool library is unable to terminate workers.
Steps to reproduce
Create file worker.js with some content like console.log("worker")
$ DENO_FUTURE=1 deno run -A main.ts
worker
error: Uncaught (in promise) TypeError: worker.terminate(...).then is not a function
worker.terminate().then(() => {
^
at file:///Users/marvinh/dev/test/deno-node-worker/main.ts:5:20
Version: Deno 1.43.3
The text was updated successfully, but these errors were encountered:
<!--
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>
<!--
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>
The
.terminate()
method is supposed to return aPromise
, see https://nodejs.org/api/worker_threads.html#workerterminate , but we returnundefined
instead. This is one of the reason thetinypool
library is unable to terminate workers.Steps to reproduce
worker.js
with some content likeconsole.log("worker")
main.ts
with these contents:DENO_FUTURE=1 deno run -A main.ts
Error
Version: Deno 1.43.3
The text was updated successfully, but these errors were encountered: