Don't raise lock when all childs are dead and we have tasks to do.