TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Developing a computational pipeline using the asyncio module in Python 3

57 pointsby jaxonduover 9 years ago

4 comments

hyperion2010over 9 years ago
Using a threadpool with asyncio doesn't buy you any parallelism, you have to use a processpool, which is fine for a data processing pipeline. Asyncio does not let you bypass the gil but it does vastly reduce the cost of spinning up absurd amounts of sockets and the like.
评论 #10660356 未加载
评论 #10659623 未加载
semi-extrinsicover 9 years ago
It would be nice if someone who groks the async &quot;with&quot; statement could add proper opcode support for it in pycdc. Better to do it when you have spare time than when you&#x27;ve clobbered an important .py file and want to recover it from the .pyc file ASAP. (pycdc can be a life saver.)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;zrax&#x2F;pycdc&#x2F;issues&#x2F;70" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zrax&#x2F;pycdc&#x2F;issues&#x2F;70</a>
评论 #10659678 未加载
baldeagleover 9 years ago
Isn&#x27;t this example just like map&#x2F;reduce in python?<p>I guess it is more like parallel running than async, since I associate async with small sleeping costs and good thread switching. How does the GIL play into this?
评论 #10659429 未加载
1st1over 9 years ago
Looks like everybody is in love with async&#x2F;await in Python :)
评论 #10659549 未加载