improvements to mrkthr_wait_for()