def settimeout(self, timeout):
# IOStream calls socket.setblocking(False), which does settimeout(0.0).
# We must not allow pymongo to set timeout to some other value (a
# positive number or None) or the socket will start blocking again.
# Instead, we simulate timeouts by interrupting ourselves with
# callbacks.
self.timeout = timeout
评论列表
文章目录