Okay, forget this. gevent will perform a switch when io is blocking. What a powerful lib ...
" The greenlets all run in the same OS thread and are scheduled cooperatively. This means that until a particular greenlet gives up control, (by calling a blocking function that will switch to theHub), other greenlets won’t get a chance to run. It is typically not an issue for an I/O bound app, but one should be aware of this when doing something CPU intensive, or when calling blocking I/O functions that bypass the libev event loop."
在 2014年5月15日星期四UTC+8下午5时18分09秒,Mengyu Zhang写道: