I think that you are possibly confusing things by introducing the concept of "reunite with the pool", which does not actually exist when implementing ThreadPoolExecutor.
Each worker thread is constantly waiting for a task (it effectively sits on top of the blocking queue). Each task includes, in turn, that the worker is “blocked”, then all homework is started, then the actual task is performed, and then postoperative housekeeping, then the worker is “unlocked”.
activeCount () gives you the number of threads in the "locked" state: note that this means that they can actually do housekeeping at the moment the activeCount () function is called, but this is considered to be "active", the task should actually be involved which should be, currently or just completed.
Whether this agrees with your notion of "rejoining the pool", I'm not sure ... as I said, you seem to be inventing the notion that, strictly speaking, does not exist from the point of view of ThreadPoolExecutor.
Neil coffey
source share