thread waitall