You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, you need to be able to clean up all resources allocated by the HTTP client: close all open connections, shutdown appropriate threads etc. It's useful and desirable e.g. when your application has some kind of lifecycle management or when implementing a library that targets to be a good citizen for your JVM.
All of that is kinda tricky with Aleph, as we do not have any specific notion of "client instance" at all, at least in a way we do for the server. By default, HTTP request goes to a default shared connections pool and operates on shared Netty's threads group. But we can expose another API that creates a reified Closable instance that you can use to call .close when necessary (like we do to shut down a server), uses provided instance of a connection pool or newly created one (but never shared), spawns separate Netty's group to shutdown it when necessary.
The text was updated successfully, but these errors were encountered:
In some cases, you need to be able to clean up all resources allocated by the HTTP client: close all open connections, shutdown appropriate threads etc. It's useful and desirable e.g. when your application has some kind of lifecycle management or when implementing a library that targets to be a good citizen for your JVM.
All of that is kinda tricky with Aleph, as we do not have any specific notion of "client instance" at all, at least in a way we do for the server. By default, HTTP request goes to a default shared connections pool and operates on shared Netty's threads group. But we can expose another API that creates a reified
Closable
instance that you can use to call.close
when necessary (like we do to shut down a server), uses provided instance of a connection pool or newly created one (but never shared), spawns separate Netty's group to shutdown it when necessary.The text was updated successfully, but these errors were encountered: