groostav
07/05/2017, 8:39 AMwhile(true) { doBlockingCall(); sleep(PollPeriod); }
I was thinking I could use a ScheduledThreadPoolExecutor
with scheduleAtFixedRate
to get these threads to do something during their off-duty cycle. The problem is I intrinsically need an unbounded thread pool since I dont have any static gaurantees about how many blocking-callers there will be.
I figured I'd follow this: https://stackoverflow.com/a/21998149/1307108
bad idea. ensurePrestart()
will create a new thread regardless of whether or not a thread is available if your core pool size is not met.
Anybody have any suggestions?