inspect.getcoroutinestate()

inspect.getcoroutinestate(coroutine)

Get current state of a coroutine object. The function is intended to be used with coroutine objects created by async def functions, but will accept any coroutine-like object that has cr_running and cr_frame attributes.

Possible states are:
  • CORO_CREATED: Waiting to start execution.
  • CORO_RUNNING: Currently being executed by the interpreter.
  • CORO_SUSPENDED: Currently suspended at an await expression.
  • CORO_CLOSED: Execution has completed.

New in version 3.5.

doc_python
2016-10-07 17:34:59
Comments
Leave a Comment

Please login to continue.