Commit 884af4c1 authored by Denis Bilenko's avatar Denis Bilenko

dns_mass_resolve.py: add comment about GEVENT_RESOLVER environ var

parent 886d2fbc
#!/usr/bin/python
"""Resolve hostnames concurrently, exit after 2 seconds.
Note, that gevent.socket.gethostname uses c-ares under the hood
and yields the control to other greenlets until the result is ready.
This script splits the job between a number of greenlets to get the
results faster.
Under the hood, this might use an asynchronous resolver based on
c-ares (the default) or thread-pool-based resolver.
You can choose between resolvers using GEVENT_RESOLVER environment
variable. To enable threading resolver:
GEVENT_RESOLVER=thread python dns_mass_resolve.py
"""
from __future__ import with_statement
import sys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment