wait for callback thread