-
Notifications
You must be signed in to change notification settings - Fork 605
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
Non-blocking backend for Process
APIs
#3182
Comments
Eek! Optional dependencies are a linker disaster waiting to happen. Even with fallbacks, the end user has to maintain a fragile dependency relationship instead of the standard transitivity and eviction warnings. Quoth the Maven (emphasis mine):
I would strongly recommend a module for this sort of thing. |
Some comparisons to other places we do classpath discovery:
All this magic potentially gets a better implicit on the algebra's companion object, but I don't think it's worth the classpath landmine. |
Are the benefits of a non-blocking process backend worth the maintenance costs? |
I have microlibrary fatigue, but I think that's a good solution here: it's there if you need it, and doesn't tax a foundational library when most people don't. |
There's another option we can pursue now: on Loom / Virtual Threads hopefully the implementation has been fixed to be non-blocking under-the-hood (someone should check this ...). After typelevel/cats-effect#3870 is released we can run JDK Process operations on a VT executor if available and hopefully get a non-blocking backend. |
There are two interesting candidates for this:
Probably NuProcess is the better established of the two. jnr-process seems to expose a lower-level API. Suffice to say, both need a closer look, particularly at the threading model.
Similar to
UnixSockets
, we can add one of these as an optional dependency, and use reflection to try and detect it at runtime, otherwise falling back to the blocking JDK APIs.The text was updated successfully, but these errors were encountered: