Пример #1
0
 def test_track_slow_event(self):
     pool = self.klass(track_events=True)
     def slow():
         api.sleep(0.1)
         return 'ok'
     pool.execute(slow)
     self.assertEquals(pool.wait(), 'ok')
Пример #2
0
 def test_track_events(self):
     pool = self.klass(track_events=True)
     for x in range(6):
         pool.execute(lambda n: n, x)
     for y in range(6):
         pool.wait()