diff options
author | Dana Powers <dana.powers@gmail.com> | 2019-03-13 21:48:25 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2019-03-13 22:18:19 -0700 |
commit | 5d7a5fc2a3795274a328343cb638397421dcfdfb (patch) | |
tree | 2bee81d412c485eb06f3f934a6251ed8a6ec4799 | |
parent | 39dd8c28da133fcc5005db3db127d687882dfe99 (diff) | |
download | kafka-python-5d7a5fc2a3795274a328343cb638397421dcfdfb.tar.gz |
Minor updates to client_async.py
-rw-r--r-- | kafka/client_async.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py index b2ea286..50b481e 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -5,7 +5,9 @@ import copy import functools import logging import random +import socket import threading +import time import weakref # selectors in stdlib as of py3.4 @@ -15,9 +17,6 @@ except ImportError: # vendored backport module from kafka.vendor import selectors34 as selectors -import socket -import time - from kafka.vendor import six from kafka.cluster import ClusterMetadata @@ -611,7 +610,8 @@ class KafkaClient(object): return responses def _poll(self, timeout): - """Returns list of (response, future) tuples""" + # This needs to be locked, but since it is only called from within the + # locked section of poll(), there is no additional lock acquisition here processed = set() start_select = time.time() |