add select based waiting
(temporarily) rename to wait_select