开发者

Fibers in Python

开发者 https://www.devze.com 2023-01-22 07:02 出处:网络
I\'m looking for a very simple way to implement fibers in Python. I\'m sure there\'s a really simple way to do it using genera开发者_运维知识库tors, but my mind is crapping out on me. This isn\'t for

I'm looking for a very simple way to implement fibers in Python. I'm sure there's a really simple way to do it using genera开发者_运维知识库tors, but my mind is crapping out on me. This isn't for a huge application, so I don't need the fanciness (or the overhead) of something like Diesel or Tornado or Twisted, I just want a neat little way to do fibers. Any ideas/suggestions?


Google around for Python coroutines. There's a lot of stuff out there with varying levels of complexity.


I've discovered that Greenlets do pretty much exactly what I've been looking to do. Sweet!

0

精彩评论

暂无评论...
验证码 换一张
取 消