mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Merge latest Tulip into asyncio
- Make the new granularity attribute private - Simplify BaseEventLoop._run_once(): avoid math.ceil(), use simple arithmetic instead
This commit is contained in:
parent
3c2f175ec4
commit
669eeaf933
4 changed files with 5 additions and 16 deletions
|
@ -1170,9 +1170,9 @@ class EventLoopTestsMixin:
|
|||
def wait():
|
||||
loop = self.loop
|
||||
calls.append(loop._run_once_counter)
|
||||
yield from asyncio.sleep(loop.granularity * 10, loop=loop)
|
||||
yield from asyncio.sleep(loop._granularity * 10, loop=loop)
|
||||
calls.append(loop._run_once_counter)
|
||||
yield from asyncio.sleep(loop.granularity / 10, loop=loop)
|
||||
yield from asyncio.sleep(loop._granularity / 10, loop=loop)
|
||||
calls.append(loop._run_once_counter)
|
||||
|
||||
self.loop.run_until_complete(wait())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue