Simple iterator with ruby fibers
I wanted to do someting simple with fibers to see how the basics work so that's what I came up with. Forgive my C-ish 'while' syntax. I haven't written it like this for way too long. I just had too.
https://gist.github.com/depy/5843359#file-gistfile1-txt
(For some reason I can't use @ in code in markdown. No idea how to fix this so I pasted the code in github gist.)
Written by Matjaz Muhic
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#