MCPcopy
hub / github.com/benoitc/gunicorn / write_nonblock

Function write_nonblock

gunicorn/util.py:342–351  ·  view source on GitHub ↗
(sock, data, chunked=False)

Source from the content-addressed store, hash-verified

340
341
342def write_nonblock(sock, data, chunked=False):
343 timeout = sock.gettimeout()
344 if timeout != 0.0:
345 try:
346 sock.setblocking(0)
347 return write(sock, data, chunked)
348 finally:
349 sock.setblocking(1)
350 else:
351 return write(sock, data, chunked)
352
353
354def write_error(sock, status_int, reason, mesg):

Callers 1

write_errorFunction · 0.85

Calls 2

writeFunction · 0.85
setblockingMethod · 0.45

Tested by

no test coverage detected