SimpleDao
gevent超时逻辑
2019-05-06, 访问数: 1019
  1. from gevent import monkey
  2. monkey.patch_all()
  3. import time
  4. import gevent
  5. i = 0
  6. with gevent.Timeout(2, False) as timeout:
  7. time.sleep(3)
  8. i = 1
  9. print i