remove_inactive_threads now notifies the caller when the pruning is actually happening