def __init__(self):
global _all_handles
# Generate label of text/unicode type from three random bytes.
self._id = codecs.encode(os.urandom(3), "hex_codec").decode("ascii")
self._legit_pid = os.getpid()
self._make_nonblocking()
self._lock = gevent.lock.Semaphore(value=1)
self._closed = False
_all_handles.append(self)
评论列表
文章目录