コード例 #1
0
from __future__ import with_statement
import gevent
from util import alarm


alarm(1)


with gevent.Timeout(0.01, False):
    while True:
        gevent.sleep(0)
コード例 #2
0
import sys
from gevent.subprocess import Popen
from util import alarm

alarm(3)

popen = Popen([sys.executable, '-c', 'pass'])
while popen.poll() is None:
    pass
コード例 #3
0
import gevent
from util import alarm


alarm(1)


with gevent.Timeout(0.01, False):
    while True:
        gevent.sleep(0)