add select based waiting
(temporarily) rename to wait_select
make select an optional argument to wait.