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

Cleanup Mill sandbox dir asynchronously #3399

Open
lefou opened this issue Aug 20, 2024 · 0 comments
Open

Cleanup Mill sandbox dir asynchronously #3399

lefou opened this issue Aug 20, 2024 · 0 comments

Comments

@lefou
Copy link
Member

lefou commented Aug 20, 2024

When Mill is started with --no-server option, it creates a new sandbox dir for each run.

How about we clean up asynchronously? e.g.

  1. Each process takes a lock on the sandbox,
  2. Every subsequent process lists the existing sandboxes and probe the lock
  3. If the lock is available, it means the process has exited, and we can delete the folder

That way for the common workflow of running Mill from the command line, we don't delete stuff immediately, but only upon the next command.

Probably something similar can be done for the long lived mill-worker-* folders as well: if the folder exists but both the clientLock and processLock are available, it means the process has exited and can be cleaned up

Originally posted by @lihaoyi in #3396 (comment)

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

1 participant