You can check out the tornado的ioloopmodule. There are instructions inside
...
class IOLoop(Configurable):
"""A level-triggered I/O loop.
We use `epoll` (Linux) or `kqueue` (BSD and Mac OS X) if they
are available, or else we fall back on select(). If you are
implementing a system that needs to handle thousands of
simultaneous connections, you should use a system that supports
either `epoll` or `kqueue`.
...
inLinux系统中用epoll,BSD或Mac OS X用kqueue,其他系统中用select.
uses the call of python标准库中的select模块。实际上select模块也只是对系统的select and does not implement it by itself.
If you want to study in depth, you can look at the source code
Thanks @evian for the addition. python标准库中的select模块是对系统各种I/OEncapsulation of multiplexing solutions.
You can check out the
tornado
的ioloop
module. There are instructions insidein
Linux
系统中用epoll
,BSD
或Mac OS X
用kqueue
,其他系统中用select
.uses the call of
python
标准库中的select
模块。实际上select
模块也只是对系统的select
and does not implement it by itself.If you want to study in depth, you can look at the source code
Thanks @evian for the addition.
python
标准库中的select
模块是对系统各种I/O
Encapsulation of multiplexing solutions.