def wait_for_state(self, state):
        while self.state != state:
            time.sleep(5)
            self.refresh()
Enqueues a new background thread request for a certain request ID.
dataset/ETHPy150Open darcyliu/storyboard/boto/cloudsearch/optionstatus.py/OptionStatus.wait_for_state--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/runtime/background.py/_BackgroundRequestsContainer.EnqueueBackgroundThread