event.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:fdslight 作者: fdslight 项目源码 文件源码
def __init__(self):
        platform = sys.platform

        if platform.find("win32") > -1 or platform.find("cygwin") > -1:
            self.__async_mode = "select"
            self.__iowait_func = self.__select_iowait

        if platform.find("darwin") > -1 or platform.find("freebsd") > -1:
            self.__async_mode = "kqueue"
            self.__kqueue_object = select.kqueue()
            self.__iowait_func = self.__kqueue_iowait

        if platform.find("linux") > -1:
            self.__async_mode = "epoll"
            self.__epoll_object = select.epoll()
            self.__iowait_func = self.__epoll_iowait

        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号