Getting rid of an allocation in wait_all.