MCPcopy Index your code
hub / github.com/python/cpython / socket_setdefaulttimeout

Function socket_setdefaulttimeout

Lib/test/test_socket.py:209–215  ·  view source on GitHub ↗
(timeout)

Source from the content-addressed store, hash-verified

207
208@contextlib.contextmanager
209def socket_setdefaulttimeout(timeout):
210 old_timeout = socket.getdefaulttimeout()
211 try:
212 socket.setdefaulttimeout(timeout)
213 yield
214 finally:
215 socket.setdefaulttimeout(old_timeout)
216
217
218@contextlib.contextmanager

Callers 3

testDefaultTimeoutMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…