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!
精彩评论