Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
gevent / docs / api / gevent.hub.rst
Size: Mime:
============================
 The Event Loop and the Hub
============================

.. module:: gevent.hub

The hub is a special greenlet created automatically to run the event loop.

The current hub can be retrieved with `get_hub`.

.. autofunction:: get_hub


.. autoclass:: Hub
    :members:

    .. automethod:: wait
    .. automethod:: cancel_wait

    .. attribute:: loop
       the event loop object (`ILoop`) associated with this hub and thus
       this native thread.


The Event Loop
==============

The current event loop can be obtained with ``get_hub().loop``.
All implementations of the loop provide a common minimum interface.

.. autointerface:: gevent._interfaces.ILoop
.. autointerface:: gevent._interfaces.IWatcher

Utilities
=========

.. autoclass:: Waiter

Exceptions
==========

.. autoclass:: LoopExit


The following exceptions *are not* expected to be thrown and *are not*
meant to be caught; if they are raised to user code it is generally a
serious programming error or a bug in gevent, greenlet, or its event
loop implementation. They are presented here for documentation
purposes only.

.. autoclass:: gevent.exceptions.ConcurrentObjectUseError
.. autoclass:: gevent.exceptions.BlockingSwitchOutError
.. autoclass:: gevent.exceptions.InvalidSwitchError