Say I am using a thread pool with a fixed number of threads that can run at the same time. So for example:
ThreadPoolExecutor executor = Executors.newFixedThreadPool(10);
Now say this executor is full. Is there a way to tell the thread that has access to this thread pool to wait until a space becomes available?