= get the next event if there is a callback associated with e: call the callback — [An Introduction to libuv](https://nikhilm.github.io/uvbook/basics.html)
_RunningLoop() def _get_running_loop(): running_loop = _running_loop._loop if running_loop is not None and _running_loop._pid == os.getpid(): return running_loop asyncio/events.py
_RunningLoop() def _get_running_loop(): running_loop = _running_loop._loop if running_loop is not None and _running_loop._pid == os.getpid(): return running_loop asyncio/events.py class _RunningLoop(threading.local): _loop = None _pid = None _running_loop = _RunningLoop() def _get_running_loop(): running_loop = _running_loop._loop if running_loop is not None and _running_loop._pid == os.getpid(): return running_loop
_RunningLoop() def _get_running_loop(): running_loop = _running_loop._loop if running_loop is not None and _running_loop._pid == os.getpid(): return running_loop asyncio/events.py class _RunningLoop(threading.local): _loop = None _pid = None _running_loop = _RunningLoop() def _get_running_loop(): running_loop = _running_loop._loop if running_loop is not None and _running_loop._pid == os.getpid(): return running_loop
the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError
the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError class AbstractEventLoop: """Abstract event loop.""" # Running and stopping the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError
the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError class AbstractEventLoop: """Abstract event loop.""" # Running and stopping the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError
the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError class AbstractEventLoop: """Abstract event loop.""" # Running and stopping the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError
the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError class AbstractEventLoop: """Abstract event loop.""" # Running and stopping the event loop. def run_forever(self): """Run the event loop until stop() is called.""" raise NotImplementedError def run_until_complete(self, future): """Run the event loop until a Future is done. Return the Future's result, or raise its exception. """ raise NotImplementedError def is_running(self): """Return whether the event loop is currently running.""" raise NotImplementedError
new_task and future.done() and not future.cancelled(): future.exception() raise finally: future.remove_done_callback(_run_until_complete_cb) ... def run_until_complete(self, future): ... future.add_done_callback(_run_until_complete_cb) try: self.run_forever() except: if new_task and future.done() and not future.cancelled(): future.exception() raise finally: future.remove_done_callback(_run_until_complete_cb) ...
new_task and future.done() and not future.cancelled(): future.exception() raise finally: future.remove_done_callback(_run_until_complete_cb) ... def run_until_complete(self, future): ... future.add_done_callback(_run_until_complete_cb) try: self.run_forever() except: if new_task and future.done() and not future.cancelled(): future.exception() raise finally: future.remove_done_callback(_run_until_complete_cb) ...
• (AFAIK) No one knows aiohttp • DIY is required • aiohttp and aiobotocore contributions • small community but well maintained • Asynchronous programming is usually more difficult
knows aiohttp • DIY is required • aiohttp and aiobotocore contributions • small community but well maintained • Asynchronous programming is usually more difficult 6. Fun and Difficulties
knows aiohttp • DIY is required • aiohttp and aiobotocore contributions • small community but well maintained • Asynchronous programming is usually more difficult 6. Fun and Difficulties
knows aiohttp • DIY is required • aiohttp and aiobotocore contributions • small community but well maintained • Asynchronous programming is usually more difficult 6. Fun and Difficulties
knows aiohttp • DIY is required • aiohttp and aiobotocore contributions • small community but well maintained • Asynchronous programming is usually more difficult 6. Fun and Difficulties
knows aiohttp • DIY is required • aiohttp and aiobotocore contributions • small community but well maintained • Asynchronous programming is usually more difficult 6. Fun and Difficulties
Syntax for Delegating to a Subgenerator 3. PEP 3156 Asynchronous IO Support Rebooted: the "asyncio" Module 4. https://magic.io/blog/uvloop-blazing-fast-python-networking/ 5. http://aiohttp.readthedocs.io/en/stable/ 6. https://nikhilm.github.io/uvbook/basics.html