-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flag to register shutdown hooks for
os.call
and os.spawn
APIs…
…, overhaul `destroy` APIs (#324) * Backports the functionality from Mill to allow us to register shutdown hooks such that when the parent process terminates the subprocesses are shut down as well. This allows the same logic to be used consistently across all `.call` and `.spawn` invocations * Consolidate `SubProcess#destroy` and `SubProcess#destroyForcibly` into a single `SubProcess#destroy` method which takes some default parameters, allowing the user to choose `async = true` or configure the `shutdownGracePeriod: Long`. * The default behavior of `SubProcess#destroy` has changed to block on the subprocess actually exiting, which I think is more intuitive. The old behavior is available under `destroy(async = true)` Best reviewed with `Hide whitespace`. Added some simple unit tests to assert the new functionality, existing unit tests should assert on existing workflows
- Loading branch information
Showing
8 changed files
with
587 additions
and
284 deletions.
There are no files selected for viewing
This file contains 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 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 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.