Question

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 generators, 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?

Was it helpful?

Solution 2

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top