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
Without withNoIdleConnectionCleanup, a static 1-thread scheduler is created and prevents application from closing.
=> Why it is shared ? Could it just be instanciated per client, since each client aslo schedules its own cleanup task and delay ? Ansi since each client can handle a lot of connections, there shouldn't be so much client instances within an app ?
Thank you ;-)
The text was updated successfully, but these errors were encountered:
With or without withNoIdleConnectionCleanup, a static 1-thread scheduler is created and prevents application from closing.
I will make the thread used by the default executor as a daemon.
Why it is shared ? Could it just be instanciated per client, since each client aslo schedules its own cleanup task and delay ?
Default is a shared cleanup scheduler, one can use a different scheduler per client using this method:
new ClientBuilder("localhost", 8080).withPoolIdleCleanupScheduler(Executors.newScheduledThreadPool(1));
since each client can handle a lot of connections, there shouldn't be so much client instances within an app ?
An RxClient is dedicated to a host+port combination (the interface supports one RxClient dedicated to a pool of homogeneous servers) so an application will have as many clients as the number of hosts it connects to. All the resources used by an RxClient like eventloops, cleanup threads, etc. can be shared and hence an RxClient does not have any overhead per se, so there isn't an issue creating multiple clients.
Without
withNoIdleConnectionCleanup
, a static 1-thread scheduler is created and prevents application from closing.=> Why it is shared ? Could it just be instanciated per client, since each client aslo schedules its own cleanup task and delay ? Ansi since each client can handle a lot of connections, there shouldn't be so much client instances within an app ?
Thank you ;-)
The text was updated successfully, but these errors were encountered: