better management of pending_tasks_for_now