gevent.resolver_thread – Backwards compatibility alias for gevent.resolver.thread

Deprecated since version 1.3: Use gevent.resolver.cares

class Resolver(hub=None)

Bases: object

Implementation of the resolver API using native threads and native resolution functions.

Using the native resolution mechanisms ensures the highest compatibility with what a non-gevent program would return including good support for platform specific configuration mechanisms. The use of native (non-greenlet) threads ensures that a caller doesn’t block other greenlets.

This implementation also has the benefit of being very simple in comparison to gevent.resolver_ares.Resolver.

Tip

Most users find this resolver to be quite reliable in a properly monkey-patched environment. However, there have been some reports of long delays, slow performance or even hangs, particularly in long-lived programs that make many, many DNS requests. If you suspect that may be happening to you, try the dnspython or ares resolver (and submit a bug report).

Navigation

Related pages