Coroutines for consumer/producer frameworks

I learned a bit about coroutines (in the context of Python) today. My understanding of them is they are a generalisation of generators in which you can return to the yield point with an argument. The problem I have is that I’m not quite sure of when they’re useful. I mean, is there some situation when they’re overwhelmingly the best thing to use?

I asked that question here in the context of a specific example, although the answer doesn’t wholly satisfy me.

Advertisements

About Henry Gomersall

I'm a engineer wanting to make things actually useful. I'm someone that wants to drive technology and ideas to be helpful for everyone. I'm someone that realises the disconnect between technology and utility and I hope to correct that...
This entry was posted in Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s