wlandau / crew

A distributed worker launcher
https://wlandau.github.io/crew/
Other
123 stars 4 forks source link

Optional asynchronous worker launches and terminations #134

Closed wlandau closed 11 months ago

wlandau commented 11 months ago

Prework

Related GitHub issues and pull requests

Summary

On some launcher plugins, worker launches and terminations are not instantaneous, and there is a need for efficient local asynchronous/parallel computing for this. In launch_worker() and terminate_worker(), plugins can now use launcher$async$eval() to evaluate a launch or termination asynchronously. Errors are detected using a custom inproc/abstract/ipc socket and an NNG condition variable.

The processes field of the launcher determines whether calls to launcher$async$eval() are actually asynchronous. A NULL value makes the calls synchronous, which can help with debugging. A positive number says to launch processes local mirai daemons on start() and shut them down on terminate().

codecov-commenter commented 11 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (7a180e3) 100.00% compared to head (6f9f8a0) 100.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #134 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 22 23 +1 Lines 1532 1657 +125 ========================================== + Hits 1532 1657 +125 ``` | [Files](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau) | Coverage Δ | | |---|---|---| | [R/crew\_async.R](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau#diff-Ui9jcmV3X2FzeW5jLlI=) | `100.00% <100.00%> (ø)` | | | [R/crew\_controller.R](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau#diff-Ui9jcmV3X2NvbnRyb2xsZXIuUg==) | `100.00% <ø> (ø)` | | | [R/crew\_eval.R](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau#diff-Ui9jcmV3X2V2YWwuUg==) | `100.00% <ø> (ø)` | | | [R/crew\_launcher.R](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau#diff-Ui9jcmV3X2xhdW5jaGVyLlI=) | `100.00% <100.00%> (ø)` | | | [R/crew\_launcher\_local.R](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau#diff-Ui9jcmV3X2xhdW5jaGVyX2xvY2FsLlI=) | `100.00% <100.00%> (ø)` | | | [R/crew\_retry.R](https://app.codecov.io/gh/wlandau/crew/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Will+Landau#diff-Ui9jcmV3X3JldHJ5LlI=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.