Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can’t really remember, sorry, that code was built for processing RSS feeds and data size was never an issue. I will take a look when get some free time…

But, I see what you mean. I had to deal with similar issues in commercial projects and the "pull" model (generators in Python ~ "yield return" in C#) almost never a good idea, especially when you have to have concurrent consumers. While callbacks are hard to combine, in C# it can be nicely abstracted with “async/await”, not sure how it is handled in Python, I stopped using it around 2.5



Python 3.5 introduced the async/await syntax, I don't do C# but at a glance it's the same.

I've been working on a similar project and I've also found the push model easier.


Care to share your code? I'd like to see a proper push implementation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: