{"id":473930,"date":"2025-09-04T15:00:54","date_gmt":"2025-09-04T15:00:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=473930"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=473930","title":{"rendered":"<span>\u041f\u043e\u0447\u0435\u043c\u0443 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 Python \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ebb\/2f8\/68d\/ebb2f868dcb6f8da1102423f47dc36d1.jpg\" width=\"735\" height=\"518\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ebb\/2f8\/68d\/ebb2f868dcb6f8da1102423f47dc36d1.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ebb\/2f8\/68d\/ebb2f868dcb6f8da1102423f47dc36d1.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 Youtube \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=GfH4QL4VqJ0&amp;pp=ygUScHl0aG9uIGRvY3VtZW50YXJ5\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u043a\u0430 \u043e Python<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043b\u0435\u043d\u0442\u044b \u0435\u0441\u0442\u044c \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u043f\u0438\u0437\u043e\u0434 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 Python 2 \u043a 3 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e (\u0441\u043f\u043e\u0439\u043b\u0435\u0440:\u00a0<a href=\"https:\/\/blog.jetbrains.com\/pycharm\/2025\/08\/the-state-of-python-2025\/#most-still-use-older-python-versions-despite-benefits-of-newer-releases\" rel=\"noopener noreferrer nofollow\">\u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/a>).<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Python 3 (3.0-3.4) \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u0435\u043b\u0430\u043b\u0438 \u0443\u043f\u043e\u0440 \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.7. \u0412 2015 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 3.5 \u0441 \u043d\u043e\u0432\u043e\u0439 \u0444\u0438\u0447\u0435\u0439:\u00a0<a href=\"https:\/\/peps.python.org\/pep-0492\/\" rel=\"noopener noreferrer nofollow\">\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 <code>async<\/code>\u00a0\u0438 <code>await<\/code>\u00a0\u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d<\/a>.<\/p>\n<p>\u041c\u0438\u043d\u043e\u0432\u0430\u043b\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u0438 \u0434\u0435\u0432\u044f\u0442\u044c \u0440\u0435\u043b\u0438\u0437\u043e\u0432, <a href=\"https:\/\/peps.python.org\/pep-0745\/\" rel=\"noopener noreferrer nofollow\">\u0447\u0435\u0440\u0435\u0437 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0434\u0435\u043b\u0438<\/a> \u0432\u044b\u043f\u0443\u0441\u0442\u044f\u0442 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python 3.14.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u043e\u0442\u0432\u043b\u0435\u043a\u043b\u0438\u0441\u044c \u043d\u0430 \u0444\u0438\u0447\u0438 \u0440\u0430\u0437\u043d\u043e\u0446\u0432\u0435\u0442\u043d\u043e\u0433\u043e REPL \u0432 3.14, \u0432 release notes \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u043e\u043c.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4c5\/8db\/708\/4c58db708a4ea29f14f1b0035a03b2dd.png\" alt=\"Colorful REPL\" width=\"1101\" height=\"385\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4c5\/8db\/708\/4c58db708a4ea29f14f1b0035a03b2dd.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4c5\/8db\/708\/4c58db708a4ea29f14f1b0035a03b2dd.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Colorful REPL<\/figcaption><\/div>\n<\/figure>\n<ol>\n<li>\n<p><a href=\"https:\/\/docs.python.org\/3.14\/whatsnew\/3.14.html#pep-779-free-threaded-python-is-officially-supported\" rel=\"noopener noreferrer nofollow\">PEP779: \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Free-Threading<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.python.org\/3.14\/whatsnew\/3.14.html#pep-734-multiple-interpreters-in-the-stdlib\" rel=\"noopener noreferrer nofollow\">PEP 734: \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 stdlib<\/a><\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0435 \u044d\u0442\u0438 \u0444\u0438\u0447\u0438 \u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a Python \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 <code>async<\/code>\u00a0\u0441 \u043d\u0430\u043c\u0438 \u0443\u0436\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442, \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f?<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>async<\/code> \u2014 \u044d\u0442\u043e \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430. \u041a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0432\u043d\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python, \u043f\u043e\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441?<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0442\u0440\u0451\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u0445 Python \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <code>async<\/code> \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430. FastAPI \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u0432 Django \u0435\u0441\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430, \u043d\u043e \u0432 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 ORM (\u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445) <a href=\"https:\/\/docs.djangoproject.com\/en\/5.2\/topics\/async\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 async \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f<\/strong><\/a>. Flask \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 (Quart \u2014 \u0435\u0433\u043e async-\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 API). SQLAlchemy, \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 ORM \u0434\u043b\u044f Python, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 asyncio \u0442\u043e\u043b\u044c\u043a\u043e \u0432 2023 \u0433\u043e\u0434\u0443 (<a href=\"https:\/\/docs.sqlalchemy.org\/en\/20\/changelog\/migration%5C_14.html#change-3414\" rel=\"noopener noreferrer nofollow\">changelog<\/a>).<\/p>\n<p>\u042f \u0437\u0430\u0434\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 <em>\u00abasync \u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d?\u00bb<\/em> \u043f\u0430\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0445 \u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p><a href=\"https:\/\/realpython.com\/team\/ctrudeau\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0440\u0438\u0441\u0442\u043e\u0444\u0435\u0440 \u0422\u0440\u044e\u0434\u043e<\/a>, \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0435\u0434\u0443\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u0430\u0441\u0442\u0430 <a href=\"https:\/\/realpython.com\/podcasts\/rpp\/\" rel=\"noopener noreferrer nofollow\">Real Python<\/a>, \u0441\u043a\u0430\u0437\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<blockquote>\n<p><em>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f? \u041e\u0439, \u044f \u0437\u0430\u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0451 await. \u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0435? \u0410 \u0442\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0435\u0451 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438? \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438.<\/em><\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/talkpython.fm\/\" rel=\"noopener noreferrer nofollow\">\u041c\u0430\u0439\u043a\u043b \u041a\u0435\u043d\u043d\u0435\u0434\u0438<\/a>\u00a0\u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<blockquote>\n<p><em>[GIL] \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0437\u0434\u0435\u0441\u0443\u0449\u0438\u0439, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Python \u0442\u0430\u043a \u0438 \u043d\u0435 \u0432\u044b\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u0445 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438\/async. \u0422\u0430\u043a \u043a\u0430\u043a async\/await \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043d\u043e \u043d\u0435 \u0432 CPU, \u0442\u043e \u043e\u043d\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0435\u0431\u0435, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u0435\u0436\u0434\u0443 4-8 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440\u0430\u043c\u0438.<\/em><\/p>\n<\/blockquote>\n<p><strong>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/strong> \u0438\u00a0<strong>\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u043a\u0438 Free-Threading \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 3.14<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0443\u0441\u0442\u044f \u0435\u0449\u0451 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u043c\u044b \u043e\u0431\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0438\u0441\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 <strong>\u043e\u043d\u0438<\/strong> \u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b?<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1: \u0432 \u0447\u0451\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438?<\/h3>\n<p><em>\u041a\u043e\u0440\u0443\u0442\u0438\u043d\u044b <\/em>\u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c. \u0412 Python \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0437\u0430 \u0440\u0430\u0437. \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430: \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0446\u0438\u043a\u043b (\u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439), \u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0435\u043c\u0443 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u043a HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c:<\/p>\n<pre><code class=\"python\">def get_thing_sync():     return http_client.get('\/thing\/which_takes?ages=1')<\/code><\/pre>\n<p>\u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430\u044f async-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u0430 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u0430:<\/p>\n<pre><code class=\"python\">async def get_thing_async():     return await http_client.get('\/thing\/which_takes?ages=1')<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>get_thing_sync()<\/code>\u00a0\u0438 <code>await get_thing_async()<\/code>, \u043e\u043d\u0438 \u0437\u0430\u0439\u043c\u0443\u0442 <strong>\u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong>. \u0422\u043e, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 <em>\u00ab\u2728 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u2728\u00bb<\/em>\u00a0\u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u0438\u0433\u0440\u044b\u0448, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0440\u0443\u0442\u0438\u043d.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 HTTP-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438 \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438. \u0412\u0430\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u2014 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 Python, \u043f\u043e\u043a\u0430 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. Async \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d: \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f (task\/future), \u0430 \u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0443 \u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0435 \u0442\u0440\u0430\u0442\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u044b CPU \u043d\u0430 busy\u2011polling.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e:<\/p>\n<ol>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 (HTTP-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 asyncio) \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u043a\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0423 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0435\u0441\u0442\u044c \u0441\u0442\u0435\u043a\u0438 \u0438 API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u044c\u044e.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <strong><em>\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b <\/em>\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0446\u0435\u043d\u043d\u044b \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c.<\/strong>\u00a0\u0417\u0430\u0442\u0435\u043c \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043e\u0434\u043d\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 asyncio \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e (HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b).<\/p>\n<p>\u0410 \u043a\u0430\u043a \u043d\u0430\u0441\u0447\u0451\u0442 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430? \u0423 \u043c\u0435\u043d\u044f <strong>\u0433\u043e\u0440\u0430\u0437\u0434\u043e<\/strong> \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Python, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0434\u0438\u0441\u043a\u0438 \u0438\u043b\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u0447\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0445 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0415\u0449\u0451 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Python, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>subprocess<\/code>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 <code>async<\/code>?<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043d\u0435\u0442. \u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 <a href=\"https:\/\/github.com\/python\/asyncio\/wiki\/ThirdParty#filesystem\" rel=\"noopener noreferrer nofollow\">asyncio Wiki<\/a>:<\/p>\n<blockquote>\n<p><em>asyncio \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 O_NONBLOCK, \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/em><\/p>\n<\/blockquote>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\u00a0<code>aiofiles<\/code>, \u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">async with aiofiles.open('filename', mode='r') as f:     contents = await f.read()<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0430 \u043c\u0438\u0441\u0441\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430? \u041d\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 <code>aiofiles<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>\u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/strong>.<\/p>\n<h4>\u041f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u043a\u0432\u0435\u0441\u0442: \u043f\u043e\u0447\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 \u043d\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439?<\/h4>\n<p>\u0412 Windows \u0435\u0441\u0442\u044c API \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/win32\/api\/ioringapi\/\" rel=\"noopener noreferrer nofollow\">IoRing<\/a>. \u0412 \u043d\u043e\u0432\u044b\u0445 \u044f\u0434\u0440\u0430\u0445 Linux \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/kernel.dk\/io%5C_uring.pdf\" rel=\"noopener noreferrer nofollow\"><code>io_uring<\/code><\/a>. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <code>io_uring<\/code>\u00a0\u0434\u043b\u044f Python, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u2014\u044d\u0442\u043e <a href=\"https:\/\/github.com\/YoSTEALTH\/Liburing\" rel=\"noopener noreferrer nofollow\">\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 API, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Cython<\/a>.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 API io_uring \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c, \u0432 Rust \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/tokio-rs\/tokio-uring\" rel=\"noopener noreferrer nofollow\">tokio<\/a>, \u0434\u043b\u044f C++ \u0435\u0441\u0442\u044c <a href=\"https:\/\/think-async.com\/Asio\/asio-1.24.0\/doc\/asio\/history.html#asio.history.asio%5C_1%5C_21%5C_0\" rel=\"noopener noreferrer nofollow\">Asio<\/a>, \u0430 \u0434\u043b\u044f Node.JS \u2014 <a href=\"https:\/\/www.phoronix.com\/news\/libuv-io-uring\" rel=\"noopener noreferrer nofollow\">libuv<\/a>.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c asyncio Wiki \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430, \u043d\u043e<\/p>\n<ol>\n<li>\n<p><strong>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e <\/strong>\u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 Linux, \u0433\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>io_uring<\/code><\/p>\n<\/li>\n<li>\n<p><code>io_uring<\/code>\u00a0\u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u043b\u0430 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e RedHat, Google \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0435\u0451. \u0412\u044b\u043f\u043b\u0430\u0442\u0438\u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u0431\u0430\u0433-\u0431\u0430\u0443\u043d\u0442\u0438 \u0437\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <code>io_uring<\/code>,\u00a0<a href=\"https:\/\/security.googleblog.com\/2023\/06\/learnings-from-kctf-vrps-42-linux.html\" rel=\"noopener noreferrer nofollow\">Google \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0430 \u0435\u0451 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432<\/a>. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0439; \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0442\u0447\u0451\u0442\u0430\u0445 \u0431\u0430\u0433-\u0431\u0430\u0443\u043d\u0442\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u044b io_uring.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0439. \u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c API \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430. \u041f\u043e\u043a\u0430 \u043e\u043d \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439.<\/p>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433: \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 <em>\u00ab\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0446\u0435\u043d\u043d\u044b \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c\u00bb <\/em>\u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <strong>\u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/strong>, \u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b \u0432 Python \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043e\u043a\u0435\u0442\u0430 \u0432 Python \u2014 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0445 GIL, \u0438 \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/python\/cpython\/blob\/v3.14.0rc2\/Modules\/socketmodule.c#L939-L1085\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e \u0432 \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/a>, \u043a\u0430\u043a \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f.<\/p>\n<h4>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435: \u043a\u0430\u043a\u0438\u0435 async-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432 asyncio?<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/th>\n<th data-colwidth=\"213\" width=\"213\">\n<p align=\"left\">Asyncio API<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Sleep<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-task.html#asyncio.sleep\" rel=\"noopener noreferrer nofollow\"><code>asyncio.sleep()<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 sleep \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043e\u0442\u043e\u043a\u0438 TCP\/UDP<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"http:\/\/asyncio.open\" rel=\"noopener noreferrer nofollow\"><code>asyncio.open<\/code><\/a><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-stream.html#asyncio-streams\" rel=\"noopener noreferrer nofollow\"><code>_connection()<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 TCP\/UDP.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">HTTP<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.aiohttp.org\/en\/stable\/client%5C_reference.html#aiohttp.ClientSession\" rel=\"noopener noreferrer nofollow\"><code>aiohttp.ClientSession()<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 HTTP-\u043a\u043b\u0438\u0435\u043d\u0442.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-subprocess.html#asyncio-subprocess\" rel=\"noopener noreferrer nofollow\"><code>asyncio.subprocess<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0447\u0435\u0440\u0435\u0434\u0438<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-queue.html#asyncio-queues\" rel=\"noopener noreferrer nofollow\"><code>asyncio.Queue<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2: \u043a\u0430\u043a \u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u044b \u043d\u0438 \u0431\u0435\u0436\u0430\u043b\u0438, \u043d\u0430\u043c \u043d\u0435 \u0443\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0442 GIL<\/h3>\n<p><a href=\"https:\/\/willmcgugan.github.io\/\" rel=\"noopener noreferrer nofollow\">\u0423\u0438\u043b\u043b \u041c\u0430\u043a\u0433\u0443\u0433\u0430\u043d<\/a>, \u0430\u0432\u0442\u043e\u0440 Rich, Textualize \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Python, \u0438\u0437\u043b\u043e\u0436\u0438\u043b \u0441\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430 async:<\/p>\n<blockquote>\n<p><em>\u041c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f async-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u043e\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u0435 \u0438\u043c\u0435\u0432\u0448\u0438\u0445 \u043e\u043f\u044b\u0442\u0430 \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412 Textual \u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432\u044b\u0437\u043e\u0432 a\u00a0<\/em><code><em>time.sleep(10)<\/em><\/code><em>, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0443.\u00a0<\/em><strong><em>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b.<\/em><\/strong><em>\u00a0\u041d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0445 \u0441 async. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430\u00bb \u043a\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u0438.\u00a0<\/em><strong><em>\u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 async-\u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u043b\u0443\u0448\u043d\u044b\u043c,<\/em><\/strong><em>\u00a0\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043e\u0442 Python.<\/em><\/p>\n<\/blockquote>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f async, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438: GIL Python.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u00ab\u043c\u043e\u0441\u0442\u0430\u00bb \u043c\u0435\u0436\u0434\u0443 C# \u0438 Python \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/tonybaloney.github.io\/CSnakes\" rel=\"noopener noreferrer nofollow\">CSnakes<\/a>, \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/tonybaloney.github.io\/CSnakes\/v1\/user-guide\/async\/\" rel=\"noopener noreferrer nofollow\">async<\/a>.<\/p>\n<p>C#, \u044f\u0437\u044b\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <a href=\"https:\/\/peps.python.org\/pep-0492\/#why-async-and-await-keywords\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>async<\/code>\/<code>await<\/code><\/a>, \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 async \u0432 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 Task\u2011based Asynchronous Pattern (TAP), \u0433\u0434\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u043c \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430\u043c\u0438, \u0441\u0435\u0442\u044c\u044e \u0438 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u044e\u0442 \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435, \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 C# \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c \u043e\u0442 \u0434\u0438\u0441\u043a\u0430 \u0434\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 API, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.text.json.jsonserializer.deserializeasync?view=net-9.0#system-text-json-jsonserializer-deserializeasync(system-io-stream-system-type-system-text-json-serialization-jsonserializercontext-system-threading-cancellationtoken)\" rel=\"noopener noreferrer nofollow\">\u0414\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f JSON \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/a>, \u0441 XML \u0442\u0430 \u0436\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f.<\/p>\n<p>\u0423 <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/standard\/parallel-programming\/task-based-asynchronous-programming\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0434\u0435\u043b\u0438 async C#<\/a>\u00a0\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 async Python \u0435\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>C# \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0443\u043b \u0437\u0430\u0434\u0430\u0447 \u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u043b\u0435. \u0421\u0440\u0435\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0426\u0438\u043a\u043b\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 Python \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0448\u0435\u043c\u0443 \u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0443. \u0417\u0430\u0434\u0430\u0447\u0438 C# \u043c\u043e\u0433\u0443\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>async-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 Python \u2014 \u044d\u0442\u043e \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. async-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 C# \u2014 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u043f\u0443\u043b\u0435 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 C# \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>Task<\/code>\u00a0\u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u0447\u0435\u043c \u043f\u043e\u0442\u043e\u043a \u0438\u043b\u0438 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0434\u0430\u0447 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Task Parallel Library (TPL).<\/p>\n<p>\u0412 Python \u00ab\u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0442\u043e\u043a\u0435 (\u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435) \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u043e\u0442\u043e\u043a\u0435. \u041f\u043e\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0442\u043e\u043a\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u0430 \u0434\u0440\u0443\u0433\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430.  \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 await-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443\u00bb<a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-dev.html#asyncio-multithreading\" rel=\"noopener noreferrer nofollow\"><sup>1<\/sup><\/a>.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044e \u0423\u0438\u043b\u043b\u0430 \u00ab\u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b\u00bb: \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0432 \u0432\u0438\u0434\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 async-\u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442 \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041a\u0430\u043a \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0432 \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 1, \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0451, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 sleep.<\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 GIL Python \u043d\u0435\u0432\u0430\u0436\u043d\u043e, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0443 \u0432\u0430\u0441 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0438\u043b\u0438 \u0434\u0435\u0441\u044f\u0442\u044c: GIL \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d.<\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442 GIL (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434), \u0438 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0443\u044e \u0444\u0438\u0447\u0443 <code>httpx<\/code> \u0434\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0438\u0441\u043a:<\/p>\n<pre><code class=\"python\">import httpx import tempfile  def download_file(url: str):     with tempfile.NamedTemporaryFile(delete=False) as tmp_file:         with httpx.stream(\"GET\", url) as response:             for chunk in response.iter_bytes():                 tmp_file.write(chunk)     return tmp_file.name<\/code><\/pre>\n<p>\u0442\u043e \u043d\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 <code>httpx<\/code>, \u043d\u0438 <code>tmp_file.write<\/code>\u00a0\u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442\u0441\u044f GIL, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u0432\u044b\u0433\u043e\u0434\u0430 \u043e\u0442 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445.<\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441 asyncio API, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-eventloop.html#executing-code-in-thread-or-process-pools\" rel=\"noopener noreferrer nofollow\"><code>run_in_executor()<\/code>\u00a0<\/a>\u0446\u0438\u043a\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0435\u0439 \u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432:<\/p>\n<pre><code class=\"python\">import asyncio import concurrent.futures  async def main():     loop = asyncio.get_running_loop()      URLS = [         \"https:\/\/example.place\/big-file-1\",         \"https:\/\/example.place\/big-file-2\",         \"https:\/\/example.place\/big-file-3\",         # etc.     ]      tasks = set()     with concurrent.futures.ThreadPoolExecutor(max_workers=10) as pool:         for url in URLS:             tasks.add(loop.run_in_executor(pool, download_file, url))         files = await asyncio.gather(*tasks)     print(files)<\/code><\/pre>\n<p>\u041c\u043d\u0435 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0432 \u0447\u0451\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0430\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/docs.python.org\/3\/library\/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor\" rel=\"noopener noreferrer nofollow\">\u043f\u0443\u043b\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>pool.submit<\/code><\/a>. \u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a async API, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0442\u0430\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>\u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u00ab\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f\u00bb \u0432 Python, \u0430 \u0447\u0442\u043e \u043d\u0435\u0442, \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443; \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h4>\u0424\u0438\u0447\u0430 free-threading \u0434\u0435\u043b\u0430\u0435\u0442 asyncio \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0438\u043b\u0438 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u043c?<\/h4>\n<p>\u0412 Python 3.13 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 Python \u0441 free-threading: \u0432 \u043d\u0435\u0439 \u0443\u0434\u0430\u043b\u0451\u043d GIL \u0438 \u0437\u0430\u043c\u0435\u043d\u0451\u043d \u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0438\u0435, \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438. \u0421\u0432\u043e\u0434\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043c\u043e\u0451\u043c <a href=\"https:\/\/www.youtube.com\/watch?v=Mp5wKOL4L2Q\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u043b\u0430\u0434\u0435 \u0441 PyCon US 2024<\/a>. \u0421\u0431\u043e\u0440\u043a\u0430 3.13 \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. 3.14 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u043c, \u0438 \u044f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0432 2026 \u0433\u043e\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c free-threading \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0443\u0437\u043a\u0438\u0445, \u0445\u043e\u0440\u043e\u0448\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u043c\u0435\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, async API \u043f\u0440\u043e\u0449\u0435 \u0432 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c \u0432 Python \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c, API \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0443\u0434\u0438\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b. \u0414\u0443\u043c\u0430\u044e, \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 free-threading \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 API \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u044f \u043f\u0438\u0441\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0443\u044e \u0434\u0432\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u041e\u0434\u043d\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 API, \u0434\u0440\u0443\u0433\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 API.<\/p>\n<p>\u041c\u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f \u043e\u0434\u043d\u043e\u0439 \u043e\u043d\u0430 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0434\u0440\u0443\u0433\u0443\u044e \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e\u0431 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0441\u0431\u043e\u0439\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043e\u0431\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d0d\/4d2\/65c\/d0d4d265cca61275537b883732497bfb.png\" width=\"1140\" height=\"188\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d0d\/4d2\/65c\/d0d4d265cca61275537b883732497bfb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d0d\/4d2\/65c\/d0d4d265cca61275537b883732497bfb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435, \u044f \u043d\u0435 \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u044f \u043d\u0435 \u0445\u043e\u0447\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. \u041c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438\u0437 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 <code>function_a<\/code>\u00a0\u0438 <code>function_b<\/code>. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 API:<\/p>\n<pre><code class=\"python\">import tpl   def function_a() -&gt; T1:     ...  def function_b() -&gt; T2:     ...  result_a: T1, result_b: T2 = tpl.invoke(function_a, function_b)<\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0441\u0451 \u044d\u0442\u043e <em>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e<\/em>, \u043d\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 GIL. Free-threading \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python, \u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 API.<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 3: \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0438\u043d\u0433 \u0434\u0432\u0443\u0445 API \u2014 \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e<\/h3>\n<p>\u042f \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445, \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 API \u2014 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u041d\u0430\u0434\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u0433\u0434\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c async. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c stdlib \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 async (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u044d\u043a\u0435\u043d\u0434\u044b \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f).<\/p>\n<p><strong>Magic<\/strong>-\u043c\u0435\u0442\u043e\u0434\u044b Python\u00a0(<code>__dunder__<\/code>) \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c\u0438.\u00a0\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c <code><strong>init<\/strong><\/code>\u00a0, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0432\u0430\u0448 \u043a\u043e\u0434 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435.<\/p>\n<h4>Async-\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/h4>\n<p>\u042d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0440\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 <code>User<\/code>\u00a0\u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <code>records<\/code>. \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0421 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c API \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"python\">class User:     @property     def records(self) -&gt; list[RecordT]:         # \u043b\u0435\u043d\u0438\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445         ...<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 API \u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e: \u0445\u043e\u0442\u044f \u043c\u0435\u0442\u043e\u0434\u044b <code>@property<\/code>\u00a0\u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c\u0438, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0442\u0430\u043a\u0438\u043c\u0438 \u0431\u044b\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443\u0442. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c <code>await<\/code>\u00a0\u043e\u0434\u043d\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0431\u0435\u0437 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445, \u0442\u043e API \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c:<\/p>\n<pre><code class=\"python\">class AsyncDatabase:     @staticmethod     async def fetch_many(id: str, of: Type[RecordT]) -&gt; list[RecordT]:         ...  class User:     @property     async def records(self) -&gt; list[RecordT]:         # \u043b\u0435\u043d\u0438\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445         return await AsyncDatabase.fetch_many(self.id, RecordT)<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0436\u0434\u0430\u0442\u044c:<\/p>\n<pre><code class=\"python\">user = User(...) # \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f await user.records # if if await user.records:     ... # \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043f\u0438\u0441\u043a\u0430? [record async for record in user.records]<\/code><\/pre>\n<p><a href=\"https:\/\/tryexceptpass.org\/article\/controlling-python-async-creep\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0435\u043c \u0433\u043b\u0443\u0431\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u044d\u0442\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e<\/a>, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c await \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0441\u0431\u043e\u0439 \u0431\u0435\u0437 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.<\/p>\n<h4>\u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h4>\n<p>\u041e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 Azure Python SDK \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438 sync, \u0438 async. \u041c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0438\u043d\u0433 \u043e\u0431\u043e\u0438\u0445 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u0435, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0447\u0435\u0433\u043e-\u0442\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0438\u043b\u0438 \u0432\u043e\u043b\u043e\u043d\u0442\u0451\u0440\u0441\u043a\u043e\u0433\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f async-\u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u043e\u043b\u044e \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b. \u0410 \u0437\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0442\u0447\u0438\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438. \u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f (\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0437-\u0437\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <code>await<\/code>) \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c Git. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 langchain, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u0438 \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435, \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u043b\u0441\u044f \u0441 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0433\u0430\u043c\u0438. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 PR \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043c\u0435\u0440\u0434\u0436\u0438\u0442\u044c \u0438\u0445 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0435 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<h4>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0431\u044d\u043a\u0435\u043d\u0434\u0430<\/h4>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e HTTP\/\u0441\u0435\u0442\u0435\u0432\u043e\u043c \u0432\u0432\u043e\u0434\u0435-\u0432\u044b\u0432\u043e\u0434\u0435, \u043d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u044d\u043a\u0435\u043d\u0434 \u0434\u043b\u044f sync \u0438 async. \u0414\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 HTTP \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 <code>requests<\/code> \u0438 <code>httpx<\/code>. \u0414\u043b\u044f <code>async<\/code> \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 <code>aiohttp<\/code>\u00a0\u0438 <code>httpx<\/code>. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0438 \u043e\u0434\u0438\u043d \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Python, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c CPython \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0443\u00a0<code>aiohttp<\/code>\u00a0\u043d\u0435\u0442 <a href=\"https:\/\/pypi.org\/project\/aiohttp\/#files\" rel=\"noopener noreferrer nofollow\">\u043d\u0438 Python 3.14 wheels, \u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 free-threading<\/a>. \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c UV Loop <a href=\"https:\/\/pypi.org\/project\/uvloop\/#files\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Python 3.14 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Windows<\/a>\u00a0.(Python 3.14 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u044b\u0448\u0435\u043b, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u043e\u0431\u043e\u0438\u0445 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e).<\/p>\n<h4>\u041e\u0432\u0435\u0440\u0445\u0435\u0434 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438<\/h4>\n<p>\u0412\u0441\u043b\u0435\u0434 \u0437\u0430 \u043e\u0432\u0435\u0440\u0445\u0435\u0434\u043e\u043c \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u0434\u0451\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 API. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f async-\u043a\u043e\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u043a\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 Pytest \u2014 \u0435\u0449\u0451 \u0438 \u0446\u0435\u043b\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439. \u042d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u0430\u043a \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443, \u0447\u0442\u043e <a href=\"https:\/\/tonybaloney.github.io\/posts\/async-test-patterns-for-pytest-and-unittest.html\" rel=\"noopener noreferrer nofollow\">\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e \u043d\u0435\u0439 \u043f\u043e\u0441\u0442, \u0438 \u043e\u043d \u0441\u0442\u0430\u043b \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432 \u043c\u043e\u0451\u043c \u0431\u043b\u043e\u0433\u0435<\/a>.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433: \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f asyncio \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d (\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 <code>asyncio<\/code> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f), \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c. \u041c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0438\u043d\u0433 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u0434\u043e\u0432\u044b\u0445 \u0431\u0430\u0437 \u2014 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430.<\/p>\n<p>\u0412\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a FastAPI, <a href=\"https:\/\/www.starlette.io\/\" rel=\"noopener noreferrer nofollow\">\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c<\/a>, \u0441\u043d\u043e\u0432\u0430 <a href=\"https:\/\/blog.jetbrains.com\/pycharm\/2025\/08\/the-state-of-python-2025\/#python-web-devs-resurgence\" rel=\"noopener noreferrer nofollow\">\u0432\u044b\u0440\u043e\u0441 \u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438<\/a>\u00a0\u0441 29% \u0434\u043e 38% \u0441\u0440\u0435\u0434\u0438 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 Python, \u0437\u0430\u043d\u044f\u0432 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e. \u0415\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0440\u0430\u0437 \u0432 \u043c\u0435\u0441\u044f\u0446. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f async \u2014 \u044d\u0442\u043e HTTP \u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434, \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e async-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0443\u0441\u043f\u0435\u0445 asyncio.<\/p>\n<p>\u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 3.14 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0443\u0431\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 free-threading \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438. \u0414\u043b\u044f \u043d\u0438\u0445 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b need\u00a0<code>async<\/code>\u00a0API, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/943878\/\"> https:\/\/habr.com\/ru\/articles\/943878\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 Youtube \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=GfH4QL4VqJ0&amp;pp=ygUScHl0aG9uIGRvY3VtZW50YXJ5\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u043a\u0430 \u043e Python<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043b\u0435\u043d\u0442\u044b \u0435\u0441\u0442\u044c \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u043f\u0438\u0437\u043e\u0434 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 Python 2 \u043a 3 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e (\u0441\u043f\u043e\u0439\u043b\u0435\u0440:\u00a0<a href=\"https:\/\/blog.jetbrains.com\/pycharm\/2025\/08\/the-state-of-python-2025\/#most-still-use-older-python-versions-despite-benefits-of-newer-releases\" rel=\"noopener noreferrer nofollow\">\u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/a>).<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Python 3 (3.0-3.4) \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u0435\u043b\u0430\u043b\u0438 \u0443\u043f\u043e\u0440 \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.7. \u0412 2015 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 3.5 \u0441 \u043d\u043e\u0432\u043e\u0439 \u0444\u0438\u0447\u0435\u0439:\u00a0<a href=\"https:\/\/peps.python.org\/pep-0492\/\" rel=\"noopener noreferrer nofollow\">\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 <code>async<\/code>\u00a0\u0438 <code>await<\/code>\u00a0\u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d<\/a>.<\/p>\n<p>\u041c\u0438\u043d\u043e\u0432\u0430\u043b\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u0438 \u0434\u0435\u0432\u044f\u0442\u044c \u0440\u0435\u043b\u0438\u0437\u043e\u0432, <a href=\"https:\/\/peps.python.org\/pep-0745\/\" rel=\"noopener noreferrer nofollow\">\u0447\u0435\u0440\u0435\u0437 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0434\u0435\u043b\u0438<\/a> \u0432\u044b\u043f\u0443\u0441\u0442\u044f\u0442 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python 3.14.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u043e\u0442\u0432\u043b\u0435\u043a\u043b\u0438\u0441\u044c \u043d\u0430 \u0444\u0438\u0447\u0438 \u0440\u0430\u0437\u043d\u043e\u0446\u0432\u0435\u0442\u043d\u043e\u0433\u043e REPL \u0432 3.14, \u0432 release notes \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u043e\u043c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>Colorful REPL<\/figcaption><\/div>\n<\/figure>\n<ol>\n<li>\n<p><a href=\"https:\/\/docs.python.org\/3.14\/whatsnew\/3.14.html#pep-779-free-threaded-python-is-officially-supported\" rel=\"noopener noreferrer nofollow\">PEP779: \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Free-Threading<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.python.org\/3.14\/whatsnew\/3.14.html#pep-734-multiple-interpreters-in-the-stdlib\" rel=\"noopener noreferrer nofollow\">PEP 734: \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 stdlib<\/a><\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0435 \u044d\u0442\u0438 \u0444\u0438\u0447\u0438 \u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a Python \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 <code>async<\/code>\u00a0\u0441 \u043d\u0430\u043c\u0438 \u0443\u0436\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442, \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f?<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>async<\/code> \u2014 \u044d\u0442\u043e \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430. \u041a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0432\u043d\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python, \u043f\u043e\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f SQL-\u0437\u0430\u043f\u0440\u043e\u0441?<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0442\u0440\u0451\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u0445 Python \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <code>async<\/code> \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430. FastAPI \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u0432 Django \u0435\u0441\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430, \u043d\u043e \u0432 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 ORM (\u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445) <a href=\"https:\/\/docs.djangoproject.com\/en\/5.2\/topics\/async\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 async \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f<\/strong><\/a>. Flask \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 (Quart \u2014 \u0435\u0433\u043e async-\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 API). SQLAlchemy, \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 ORM \u0434\u043b\u044f Python, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 asyncio \u0442\u043e\u043b\u044c\u043a\u043e \u0432 2023 \u0433\u043e\u0434\u0443 (<a href=\"https:\/\/docs.sqlalchemy.org\/en\/20\/changelog\/migration%5C_14.html#change-3414\" rel=\"noopener noreferrer nofollow\">changelog<\/a>).<\/p>\n<p>\u042f \u0437\u0430\u0434\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 <em>\u00abasync \u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d?\u00bb<\/em> \u043f\u0430\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0445 \u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p><a href=\"https:\/\/realpython.com\/team\/ctrudeau\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0440\u0438\u0441\u0442\u043e\u0444\u0435\u0440 \u0422\u0440\u044e\u0434\u043e<\/a>, \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0435\u0434\u0443\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u0430\u0441\u0442\u0430 <a href=\"https:\/\/realpython.com\/podcasts\/rpp\/\" rel=\"noopener noreferrer nofollow\">Real Python<\/a>, \u0441\u043a\u0430\u0437\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<blockquote>\n<p><em>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f? \u041e\u0439, \u044f \u0437\u0430\u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0451 await. \u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0435? \u0410 \u0442\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0435\u0451 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438? \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438.<\/em><\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/talkpython.fm\/\" rel=\"noopener noreferrer nofollow\">\u041c\u0430\u0439\u043a\u043b \u041a\u0435\u043d\u043d\u0435\u0434\u0438<\/a>\u00a0\u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<blockquote>\n<p><em>[GIL] \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0437\u0434\u0435\u0441\u0443\u0449\u0438\u0439, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Python \u0442\u0430\u043a \u0438 \u043d\u0435 \u0432\u044b\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u0445 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438\/async. \u0422\u0430\u043a \u043a\u0430\u043a async\/await \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043d\u043e \u043d\u0435 \u0432 CPU, \u0442\u043e \u043e\u043d\u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0435\u0431\u0435, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u0435\u0436\u0434\u0443 4-8 \u0432\u0435\u0431-\u0432\u043e\u0440\u043a\u0435\u0440\u0430\u043c\u0438.<\/em><\/p>\n<\/blockquote>\n<p><strong>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/strong> \u0438\u00a0<strong>\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u043a\u0438 Free-Threading \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 3.14<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0443\u0441\u0442\u044f \u0435\u0449\u0451 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u043c\u044b \u043e\u0431\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0438\u0441\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 <strong>\u043e\u043d\u0438<\/strong> \u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b?<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1: \u0432 \u0447\u0451\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438?<\/h3>\n<p><em>\u041a\u043e\u0440\u0443\u0442\u0438\u043d\u044b <\/em>\u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c. \u0412 Python \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0437\u0430 \u0440\u0430\u0437. \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430: \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0446\u0438\u043a\u043b (\u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439), \u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0435\u043c\u0443 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u043a HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c:<\/p>\n<pre><code class=\"python\">def get_thing_sync():     return http_client.get('\/thing\/which_takes?ages=1')<\/code><\/pre>\n<p>\u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430\u044f async-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u0430 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u0430:<\/p>\n<pre><code class=\"python\">async def get_thing_async():     return await http_client.get('\/thing\/which_takes?ages=1')<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>get_thing_sync()<\/code>\u00a0\u0438 <code>await get_thing_async()<\/code>, \u043e\u043d\u0438 \u0437\u0430\u0439\u043c\u0443\u0442 <strong>\u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong>. \u0422\u043e, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 <em>\u00ab\u2728 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u2728\u00bb<\/em>\u00a0\u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u0438\u0433\u0440\u044b\u0448, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0440\u0443\u0442\u0438\u043d.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 HTTP-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438 \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438. \u0412\u0430\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u2014 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 Python, \u043f\u043e\u043a\u0430 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. Async \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d: \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f (task\/future), \u0430 \u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0443 \u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0435 \u0442\u0440\u0430\u0442\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u044b CPU \u043d\u0430 busy\u2011polling.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e:<\/p>\n<ol>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 (HTTP-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 asyncio) \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u043a\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0423 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0435\u0441\u0442\u044c \u0441\u0442\u0435\u043a\u0438 \u0438 API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u044c\u044e.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <strong><em>\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b <\/em>\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0446\u0435\u043d\u043d\u044b \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c.<\/strong>\u00a0\u0417\u0430\u0442\u0435\u043c \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043e\u0434\u043d\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 asyncio \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e (HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b).<\/p>\n<p>\u0410 \u043a\u0430\u043a \u043d\u0430\u0441\u0447\u0451\u0442 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430? \u0423 \u043c\u0435\u043d\u044f <strong>\u0433\u043e\u0440\u0430\u0437\u0434\u043e<\/strong> \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Python, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0434\u0438\u0441\u043a\u0438 \u0438\u043b\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u0447\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0445 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0415\u0449\u0451 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Python, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>subprocess<\/code>.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 <code>async<\/code>?<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043d\u0435\u0442. \u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 <a href=\"https:\/\/github.com\/python\/asyncio\/wiki\/ThirdParty#filesystem\" rel=\"noopener noreferrer nofollow\">asyncio Wiki<\/a>:<\/p>\n<blockquote>\n<p><em>asyncio \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 O_NONBLOCK, \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/em><\/p>\n<\/blockquote>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\u00a0<code>aiofiles<\/code>, \u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">async with aiofiles.open('filename', mode='r') as f:     contents = await f.read()<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0430 \u043c\u0438\u0441\u0441\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430? \u041d\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 <code>aiofiles<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>\u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/strong>.<\/p>\n<h4>\u041f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u043a\u0432\u0435\u0441\u0442: \u043f\u043e\u0447\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 \u043d\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439?<\/h4>\n<p>\u0412 Windows \u0435\u0441\u0442\u044c API \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/win32\/api\/ioringapi\/\" rel=\"noopener noreferrer nofollow\">IoRing<\/a>. \u0412 \u043d\u043e\u0432\u044b\u0445 \u044f\u0434\u0440\u0430\u0445 Linux \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/kernel.dk\/io%5C_uring.pdf\" rel=\"noopener noreferrer nofollow\"><code>io_uring<\/code><\/a>. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <code>io_uring<\/code>\u00a0\u0434\u043b\u044f Python, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u2014\u044d\u0442\u043e <a href=\"https:\/\/github.com\/YoSTEALTH\/Liburing\" rel=\"noopener noreferrer nofollow\">\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 API, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Cython<\/a>.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 API io_uring \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c, \u0432 Rust \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/tokio-rs\/tokio-uring\" rel=\"noopener noreferrer nofollow\">tokio<\/a>, \u0434\u043b\u044f C++ \u0435\u0441\u0442\u044c <a href=\"https:\/\/think-async.com\/Asio\/asio-1.24.0\/doc\/asio\/history.html#asio.history.asio%5C_1%5C_21%5C_0\" rel=\"noopener noreferrer nofollow\">Asio<\/a>, \u0430 \u0434\u043b\u044f Node.JS \u2014 <a href=\"https:\/\/www.phoronix.com\/news\/libuv-io-uring\" rel=\"noopener noreferrer nofollow\">libuv<\/a>.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c asyncio Wiki \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430, \u043d\u043e<\/p>\n<ol>\n<li>\n<p><strong>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e <\/strong>\u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 Linux, \u0433\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>io_uring<\/code><\/p>\n<\/li>\n<li>\n<p><code>io_uring<\/code>\u00a0\u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u043b\u0430 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e RedHat, Google \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0435\u0451. \u0412\u044b\u043f\u043b\u0430\u0442\u0438\u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u0431\u0430\u0433-\u0431\u0430\u0443\u043d\u0442\u0438 \u0437\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <code>io_uring<\/code>,\u00a0<a href=\"https:\/\/security.googleblog.com\/2023\/06\/learnings-from-kctf-vrps-42-linux.html\" rel=\"noopener noreferrer nofollow\">Google \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0430 \u0435\u0451 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432<\/a>. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0439; \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0442\u0447\u0451\u0442\u0430\u0445 \u0431\u0430\u0433-\u0431\u0430\u0443\u043d\u0442\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u044b io_uring.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0439. \u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c API \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430. \u041f\u043e\u043a\u0430 \u043e\u043d \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439.<\/p>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433: \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 <em>\u00ab\u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0446\u0435\u043d\u043d\u044b \u0432 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c\u00bb <\/em>\u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <strong>\u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/strong>, \u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b \u0432 Python \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043e\u043a\u0435\u0442\u0430 \u0432 Python \u2014 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0445 GIL, \u0438 \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/python\/cpython\/blob\/v3.14.0rc2\/Modules\/socketmodule.c#L939-L1085\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e \u0432 \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/a>, \u043a\u0430\u043a \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f.<\/p>\n<h4>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435: \u043a\u0430\u043a\u0438\u0435 async-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432 asyncio?<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/th>\n<th data-colwidth=\"213\" width=\"213\">\n<p align=\"left\">Asyncio API<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Sleep<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-task.html#asyncio.sleep\" rel=\"noopener noreferrer nofollow\"><code>asyncio.sleep()<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 sleep \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043e\u0442\u043e\u043a\u0438 TCP\/UDP<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"http:\/\/asyncio.open\" rel=\"noopener noreferrer nofollow\"><code>asyncio.open<\/code><\/a><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-stream.html#asyncio-streams\" rel=\"noopener noreferrer nofollow\"><code>_connection()<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 TCP\/UDP.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">HTTP<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.aiohttp.org\/en\/stable\/client%5C_reference.html#aiohttp.ClientSession\" rel=\"noopener noreferrer nofollow\"><code>aiohttp.ClientSession()<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 HTTP-\u043a\u043b\u0438\u0435\u043d\u0442.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-subprocess.html#asyncio-subprocess\" rel=\"noopener noreferrer nofollow\"><code>asyncio.subprocess<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0447\u0435\u0440\u0435\u0434\u0438<\/p>\n<\/td>\n<td data-colwidth=\"213\" width=\"213\">\n<p align=\"left\"><a href=\"https:\/\/docs.python.org\/3\/library\/asyncio-queue.html#asyncio-queues\" rel=\"noopener noreferrer nofollow\"><code>asyncio.Queue<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2: \u043a\u0430\u043a \u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u044b \u043d\u0438 \u0431\u0435\u0436\u0430\u043b\u0438, \u043d\u0430\u043c \u043d\u0435 \u0443\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0442 GIL<\/h3>\n<p><a href=\"https:\/\/willmcgugan.github.io\/\" rel=\"noopener noreferrer nofollow\">\u0423\u0438\u043b\u043b \u041c\u0430\u043a\u0433\u0443\u0433\u0430\u043d<\/a>, \u0430\u0432\u0442\u043e\u0440 Rich, Textualize \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Python, \u0438\u0437\u043b\u043e\u0436\u0438\u043b \u0441\u0432\u043e\u044e \u0442\u043e\u0447\u043a\u0443 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430 async:<\/p>\n<blockquote>\n<p><em>\u041c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f async-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u043e\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u0435 \u0438\u043c\u0435\u0432\u0448\u0438\u0445 \u043e\u043f\u044b\u0442\u0430 \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412 Textual \u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432\u044b\u0437\u043e\u0432 a\u00a0<\/em><code><em>time.sleep(10)<\/em><\/code><em>, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0443.\u00a0<\/em><strong><em>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b.<\/em><\/strong><em>\u00a0\u041d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0445 \u0441 async. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430\u00bb \u043a\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u0438.\u00a0<\/em><strong><em>\u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 async-\u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u043b\u0443\u0448\u043d\u044b\u043c,<\/em><\/strong><em>\u00a0\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043e\u0442 Python.<\/em><\/p>\n<\/blockquote>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f async, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438: GIL Python.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u00ab\u043c\u043e\u0441\u0442\u0430\u00bb \u043c\u0435\u0436\u0434\u0443 C# \u0438 Python \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/tonybaloney.github.io\/CSnakes\" rel=\"noopener noreferrer nofollow\">CSnakes<\/a>, \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/tonybaloney.github.io\/CSnakes\/v1\/user-guide\/async\/\" rel=\"noopener noreferrer nofollow\">async<\/a>.<\/p>\n<p>C#, \u044f\u0437\u044b\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <a href=\"https:\/\/peps.python.org\/pep-0492\/#why-async-and-await-keywords\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>async<\/code>\/<code>await<\/code><\/a>, \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 async \u0432 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 Task\u2011based Asynchronous Pattern (TAP), \u0433\u0434\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u043c \u043f\u0443\u043b\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430\u043c\u0438, \u0441\u0435\u0442\u044c\u044e \u0438 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u044e\u0442 \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435, \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 C# \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c \u043e\u0442 \u0434\u0438\u0441\u043a\u0430 \u0434\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 API, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.text.json.jsonserializer.deserializeasync?view=net-9.0#system-text-json-jsonserializer-deserializeasync(system-io-stream-system-type-system-text-json-serialization-jsonserializercontext-system-threading-cancellationtoken)\" rel=\"noopener noreferrer nofollow\">\u0414\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f JSON \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e<\/a>, \u0441 XML \u0442\u0430 \u0436\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f.<\/p>\n<p>\u0423 <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/standard\/parallel-programming\/task-based-asynchronous-programming\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0434\u0435\u043b\u0438 async C#<\/a>\u00a0\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 async Python \u0435\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>C# \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0443\u043b \u0437\u0430\u0434\u0430\u0447 \u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u043b\u0435. \u0421\u0440\u0435\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0426\u0438\u043a\u043b\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 Python \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0448\u0435\u043c\u0443 \u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0443. \u0417\u0430\u0434\u0430\u0447\u0438 C# \u043c\u043e\u0433\u0443\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>async-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 Python \u2014 \u044d\u0442\u043e \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. async-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 C# \u2014 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0432 \u043f\u0443\u043b\u0435 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 C# \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>Task<\/code>\u00a0\u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u0447\u0435\u043c \u043f\u043e\u0442\u043e\u043a \u0438\u043b\u0438 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0434\u0430\u0447 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Task Parallel Library (TPL).<\/p>\n<p>\u0412 Python \u00ab\u0446\u0438\u043a\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0442\u043e\u043a\u0435 (\u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435) \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u043e\u0442\u043e\u043a\u0435. \u041f\u043e\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0430<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-473930","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=473930"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473930\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=473930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=473930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=473930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}