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

setGracefulCleanup doesn't work for worker thread. #282

Closed
1 of 8 tasks
heejaechang opened this issue Nov 18, 2022 · 3 comments
Closed
1 of 8 tasks

setGracefulCleanup doesn't work for worker thread. #282

heejaechang opened this issue Nov 18, 2022 · 3 comments

Comments

@heejaechang
Copy link

Operating System

  • Linux
  • Windows 7
  • Windows 10
  • MacOS
  • other:

NodeJS Version

  • 0.x
  • 4.x
  • 6.x
  • 7.x
  • other: v16

Tmp Version

0.2.1

Expected Behavior

either tmp.setGracefulCleanup should just work for worker threads as well or provide a way to set it up for worker threads.

Experienced Behavior

tmp.setGracefulCleanup works only for main thread (process)

@raszi
Copy link
Owner

raszi commented Feb 29, 2024

I am considering dropping the graceful cleanup feature in the new TS version I am working on.

Would that be a game-changer for you?

@jakebailey
Copy link

This is a pretty popular feature used in many widely-used projects: https://github.com/search?q=%2Ftmp%5C.setGracefulCleanup%2F+%28language%3AJavaScript+OR+language%3ATypeScript%29&type=code

It'd be a shame to lose it.

Reading the docs, I'm not sure that there's a way to hook into worker exit from within the worker (only outside), so I'm not sure that this issue is fixable. But I don't think that's a reason to drop the feature.

@silkentrance
Copy link
Collaborator

you need to clean up the temporary files yourself.

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

No branches or pull requests

4 participants