class ThreadedResolver: (source)
Known subclasses: twisted.names.client.ThreadedResolver
Constructor: ThreadedResolver(reactor)
Implements interfaces: twisted.internet.interfaces.IResolverSimple
ThreadedResolver uses a reactor, a threadpool, and socket.gethostbyname to perform name lookups without blocking the reactor thread. It also supports timeouts indepedently from whatever timeout logic socket.gethostbyname might have.
| Method | __init__ |
Undocumented |
| Method | get |
See twisted.internet.interfaces.IResolverSimple.getHostByName. |
| Instance Variable | reactor |
The reactor the threadpool of which will be used to call socket.gethostbyname and the I/O thread of which the result will be delivered. |
| Method | _check |
Undocumented |
| Method | _cleanup |
Undocumented |
| Method | _fail |
Undocumented |
| Instance Variable | _running |
Undocumented |
str, timeout: Sequence[ int] = (Deferred[ str]:
(source)
¶
See twisted.internet.interfaces.IResolverSimple.getHostByName.
Note that the elements of timeout are summed and the result is used as a timeout for the lookup. Any intermediate timeout or retry logic is left up to the platform via socket.gethostbyname.
The reactor the threadpool of which will be used to call socket.gethostbyname and the I/O thread of which the result will be delivered.