MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / close

Method close

pywebio/session/coroutinebased.py:355–370  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

353 self.step(future.result())
354
355 def close(self):
356 if self.task_closed:
357 return
358
359 self.task_closed = True
360
361 self.coro.close()
362 while self.pending_futures:
363 _, f = self.pending_futures.popitem()
364 f.cancel()
365
366 self.on_coro_stop(self)
367 self.on_coro_stop = None # avoid circular reference
368 self.session = None
369
370 logger.debug('Task[%s] closed', self.coro_id)
371
372 def __del__(self):
373 if not self.task_closed:

Callers 3

stepMethod · 0.95
_cleanupMethod · 0.45
closeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected