On Sat, 25 Jan 2014 15:02:56 +0100 (CET) victor.stinner <python-check...@python.org> wrote: > + > + @tasks.coroutine > + def wait(): > + loop = self.loop > + calls.append(loop._run_once_counter) > + yield from tasks.sleep(loop.granularity * 10, loop=loop) > + calls.append(loop._run_once_counter) > + yield from tasks.sleep(loop.granularity / 10, loop=loop) > + calls.append(loop._run_once_counter) > + > + self.loop.run_until_complete(wait()) > + calls.append(self.loop._run_once_counter) > + self.assertEqual(calls, [1, 3, 5, 6])
Could you add a comment explaining the number of calls to run_once()? For example, why does it jump from 1 to 3 and then 3 to 5, rather than 1 to 2 and then 2 to 3? Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com