Skip to content

Commit 5d7a5fc

Browse files
dpkpjeffwidman
authored andcommitted
Minor updates to client_async.py
1 parent 39dd8c2 commit 5d7a5fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kafka/client_async.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import functools
66
import logging
77
import random
8+
import socket
89
import threading
10+
import time
911
import weakref
1012

1113
# selectors in stdlib as of py3.4
@@ -15,9 +17,6 @@
1517
# vendored backport module
1618
from kafka.vendor import selectors34 as selectors
1719

18-
import socket
19-
import time
20-
2120
from kafka.vendor import six
2221

2322
from kafka.cluster import ClusterMetadata
@@ -611,7 +610,8 @@ def poll(self, timeout_ms=None, future=None):
611610
return responses
612611

613612
def _poll(self, timeout):
614-
"""Returns list of (response, future) tuples"""
613+
# This needs to be locked, but since it is only called from within the
614+
# locked section of poll(), there is no additional lock acquisition here
615615
processed = set()
616616

617617
start_select = time.time()

0 commit comments

Comments
 (0)