def waiter(): result.append(gruvi.wait(objects))
def waiter(): result.append(gruvi.wait(futures, timeout=0.01))
def waiter(): result.append(gruvi.wait(futures))
def waiter(): gruvi.wait(futures, count=2)
def test_timeout(self): futures = [Future() for i in range(10)] result = gruvi.wait(futures, timeout=0.01) self.assertEqual(result, ([], futures)) for fut in futures: self.assertFalse(fut._callbacks)
def waiter(): result.append(gruvi.wait(futures, count=5))
def test_timeout(self): futures = [Future() for i in range(10)] result = gruvi.wait(futures, timeout=0.01) self.assertEqual(result, ([], futures)) for fut in futures: self.assertIsNone(fut._callbacks)