sema_queue loop in wait_all