remove uses of map that don't work in py3
This commit is contained in:
		@@ -121,7 +121,9 @@ class LibevLoop(object):
 | 
			
		||||
 | 
			
		||||
        for conn in self._live_conns | self._new_conns | self._closed_conns:
 | 
			
		||||
            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
 | 
			
		||||
        log.debug("Waiting for event loop thread to join...")
 | 
			
		||||
 
 | 
			
		||||
@@ -108,8 +108,10 @@ class RoundRobinPolicyTest(unittest.TestCase):
 | 
			
		||||
                self.assertEqual(sorted(qplan), hosts)
 | 
			
		||||
 | 
			
		||||
        threads = [Thread(target=check_query_plan) for i in range(4)]
 | 
			
		||||
        map(lambda t: t.start(), threads)
 | 
			
		||||
        map(lambda t: t.join(), threads)
 | 
			
		||||
        for t in threads:
 | 
			
		||||
            t.start()
 | 
			
		||||
        for t in threads:
 | 
			
		||||
            t.join()
 | 
			
		||||
 | 
			
		||||
    def test_thread_safety_during_modification(self):
 | 
			
		||||
        hosts = range(100)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user