gevent.exceptions – Exceptions

Exceptions.

New in version 1.3b1.

exception LoopExit[source]

Bases: Exception

Exception thrown when the hub finishes running (gevent.hub.Hub.run would return).

In a normal application, this is never thrown or caught explicitly. The internal implementation of functions like gevent.hub.Hub.join() and gevent.joinall() may catch it, but user code generally should not.

Caution

Errors in application programming can also lead to this exception being raised. Some examples include (but are not limited too):

  • greenlets deadlocking on a lock;

  • using a socket or other gevent object with native thread affinity from a different thread

property hub

The (optional) hub that raised the error.

New in version 20.12.0.

Next page: gevent.fileobject – Wrappers to make file-like objects cooperative