def waitForQueue(self, timeout=1.0, events=1):
        with gevent.Timeout(timeout):
            while self.output.qsize() < events:
                gevent.sleep(0.0)

        self.i.stop()
        if events:
            return [self.output.get() for n in xrange(events)]
dataset/ETHPy150Open artirix/logcabin/test/test_inputs.py/InputTests.waitForQueue/original