https://medium.com/@yeraydiazdiaz/asyncio-coroutine-patterns-errors-and-cancellation-3bb422e961ff - пример по обработке ошибок и логгированию с asyncio
#asyncio #exceptions #logging
#asyncio #exceptions #logging
Medium
Asyncio Coroutine Patterns: Errors and cancellation
This is the second part of a two part series on coroutine patterns in asyncio, to fully benefit from this article please read the first…
Если вы хотите вызвать блокирующий метод из корутины и не заблокировать работу всего основного потока - вы можете вызвать ее в другом потоке используя AbstractEventLoop.run_in_executor(executor, func, *args):
fn = functools.partial(method, *args)#asyncio #functools
result = await loop.run_in_executor(None, fn)
https://pawelmhm.github.io/asyncio/python/aiohttp/2016/04/22/asyncio-aiohttp.html - делаем миллион запросов с помощью aiohttp
#asyncio #aiohttp #requests
#asyncio #aiohttp #requests
pawelmhm.github.io
Making 1 million requests with python-aiohttp
In this post I’d like to test limits of python aiohttp and check its performance in terms of requests per minute. Everyone knows that asynchronous code perf...
https://jvns.ca/blog/2017/06/03/async-io-on-linux--select--poll--and-epoll/ - статья о epool и asyncio
#asyncio #epool
#asyncio #epool
Julia Evans
Async IO on Linux: select, poll, and epoll
This week I got a new book in the mail: The Linux Programming Interface. My awesome coworker Arshia recommended it to me so I bought it! It’s written by the maintainer of the Linux man-pages project, Michael Kerrisk. It talks about the Linux programming interface…
https://www.integralist.co.uk/posts/python-asyncio/ - хорошая статья о параллельности в python
#asyncio #concurrency #threads #multiprocess
#asyncio #concurrency #threads #multiprocess
http://calpaterson.com/async-python-is-not-faster.html - статья с бенчмарком wsgi фреймворков и асинхронных фреймворков цифры которой все же стоит проверить, но все тесты и код присутствует в ссылке на гитхаб внутри
есть и перевод этой статьи - https://habr.com/ru/company/ruvds/blog/507570/ и в комментариях понятно написано почему данная статья не совсем правильна
#benchmarking #frameworks #asyncio #wsgi
есть и перевод этой статьи - https://habr.com/ru/company/ruvds/blog/507570/ и в комментариях понятно написано почему данная статья не совсем правильна
#benchmarking #frameworks #asyncio #wsgi
calpaterson.com
Async Python is not faster
Async Python is slower than "sync" Python under a realistic benchmark. A bigger worry is that async frameworks go a bit wobbly under load.
https://tenthousandmeters.com/blog/python-behind-the-scenes-12-how-asyncawait-works-in-python/
#asyncio #threads #coroutines
#asyncio #threads #coroutines
Tenthousandmeters
Python behind the scenes #12: how async/await works in Python
Mark functions as async. Call them with await. All of a sudden, your program becomes asynchronous – it can do useful things while it waits for...