MCPcopy
hub / github.com/django/django / closing_iterator_wrapper

Function closing_iterator_wrapper

django/test/client.py:120–126  ·  view source on GitHub ↗
(iterable, close)

Source from the content-addressed store, hash-verified

118
119
120def closing_iterator_wrapper(iterable, close):
121 try:
122 yield from iterable
123 finally:
124 request_finished.disconnect(close_old_connections)
125 close() # will fire request_finished
126 request_finished.connect(close_old_connections)
127
128
129async def aclosing_iterator_wrapper(iterable, close):

Callers 2

__call__Method · 0.85
__call__Method · 0.85

Calls 2

disconnectMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected