_pending_tasks creation should be in the constructor