Merge pull request #753 from datastax/python-749
remove uses of map that don't work in py3
This commit is contained in:
commit
941dab462b
@ -121,7 +121,9 @@ class LibevLoop(object):
|
|||||||
|
|
||||||
for conn in self._live_conns | self._new_conns | self._closed_conns:
|
for conn in self._live_conns | self._new_conns | self._closed_conns:
|
||||||
conn.close()
|
conn.close()
|
||||||
map(lambda w: w.stop(), (w for w in (conn._write_watcher, conn._read_watcher) if w))
|
for watcher in (conn._write_watcher, conn._read_watcher):
|
||||||
|
if watcher:
|
||||||
|
watcher.stop()
|
||||||
|
|
||||||
self.notify() # wake the timer watcher
|
self.notify() # wake the timer watcher
|
||||||
log.debug("Waiting for event loop thread to join...")
|
log.debug("Waiting for event loop thread to join...")
|
||||||
|
@ -108,8 +108,10 @@ class RoundRobinPolicyTest(unittest.TestCase):
|
|||||||
self.assertEqual(sorted(qplan), hosts)
|
self.assertEqual(sorted(qplan), hosts)
|
||||||
|
|
||||||
threads = [Thread(target=check_query_plan) for i in range(4)]
|
threads = [Thread(target=check_query_plan) for i in range(4)]
|
||||||
map(lambda t: t.start(), threads)
|
for t in threads:
|
||||||
map(lambda t: t.join(), threads)
|
t.start()
|
||||||
|
for t in threads:
|
||||||
|
t.join()
|
||||||
|
|
||||||
def test_thread_safety_during_modification(self):
|
def test_thread_safety_during_modification(self):
|
||||||
hosts = range(100)
|
hosts = range(100)
|
||||||
|
Loading…
Reference in New Issue
Block a user