PyDocs

Nav

Python Runtime Services

coroutine.close

builtins

method
  • coroutine.close()
Causes the coroutine to clean itself up and exit. If the coroutine is suspended, this method first delegates to the close() method of the iterator that caused the coroutine to suspend, if it has such a method. Then it raises GeneratorExit at the suspension point, causing the coroutine to immediately clean itself up. Finally, the coroutine is marked as having finished executing, even if it was never started.
0 Examples
No examples for builtins/coroutine.close.
See Also
No see-alsos for builtins/coroutine.close
0 Notes
No notes for coroutine.close