Commit 3d7bf25b authored by Denis Bilenko's avatar Denis Bilenko

greentest/mysubprocess.py: add gevent_wait() method to Popen

parent 83cb5e9f
......@@ -49,3 +49,10 @@ class Popen(subprocess.Popen):
os.system('taskkill /f /pid %s' % self.pid)
else:
sys.stderr.write('Cannot kill on this platform. Please kill %s\n' % self.pid)
def gevent_wait(self):
from gevent import sleep
while True:
if self.poll() is not None:
return self.poll()
sleep(0.1)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment