TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Extending Python’s generators to support mainloops

12 点作者 chromano超过 9 年前

1 comment

jonathaneunice超过 9 年前
I did not understand the highly synchronous, sequential, blocking behavior of the code examples. That would absolutely make the events example not work. Or is it implicit that an asynchronous operation would replace today's blocking `next()`? That `itertools.consume()` or the final `next()` would provide an async upgrade, similar to the way Unix's `select()` works? That was never explicitly mentioned...but is the only way this pattern would make larger sense / scale usefully.
评论 #10338227 未加载