https://kotlinlang.org logo
Title
t

thana

08/30/2019, 6:38 AM
On the JVM the Default and IO dispatchers are backed by fixed-size threadpool? right? according to the java docs of
newFixedThreadPool
it is backed by an unbounded job queue. is that true for our dispatchers, too?
s

SiebelsTim

08/30/2019, 6:49 AM
IO has unlimited threads. Default is limited by number of cores you have, and at least 2. Job queued are unbound.
l

louiscad

08/30/2019, 7:35 AM
This is all written in the KDoc of each dispatcher, please read it.
t

thana

08/30/2019, 7:38 AM
yes just wanted to make this clear. the actual problem i have: is there a way to track the size of the queue?
l

louiscad

08/30/2019, 7:40 AM
No, there's no such way, but why would you need it?
t

thana

08/30/2019, 7:50 AM
im trying to figure out whats causing the behavior of the system i am experiencing
i feel that being able to measure the size of the queue would be very helpful
l

louiscad

08/30/2019, 8:09 AM
Maybe you can access the internals and peek at it using reflection on the JVM
t

thana

08/30/2019, 8:44 AM
i'd love to set up monitoring for it - maybe i will monitor the aprt that offers the jobs in the first place