MCPcopy Create free account
hub / github.com/EasyIME/PIME / close_fd

Method close_fd

python/python3/tornado/ioloop.py:788–806  ·  view source on GitHub ↗
(self, fd: Union[int, _Selectable])

Source from the content-addressed store, hash-verified

786 return fd.fileno(), fd
787
788 def close_fd(self, fd: Union[int, _Selectable]) -> None:
789 # """Utility method to close an ``fd``.
790
791 # If ``fd`` is a file-like object, we close it directly; otherwise
792 # we use `os.close`.
793
794 # This method is provided for use by `IOLoop` subclasses (in
795 # implementations of ``IOLoop.close(all_fds=True)`` and should
796 # not generally be used by application code.
797
798 # .. versionadded:: 4.0
799 # """
800 try:
801 if isinstance(fd, int):
802 os.close(fd)
803 else:
804 fd.close()
805 except OSError:
806 pass
807
808
809class _Timeout(object):

Callers 1

closeMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected