tokio-rs / doc-push

Tokio doc blitz effort - A concerted effort to improve Tokio's documentation.
MIT License
50 stars 7 forks source link

polling #97

Open robbieh opened 5 years ago

robbieh commented 5 years ago

Why is polling OK? Why doesn't it waste a ton of CPU? How is this really working? The HelloWorld example impl doesn't really help make sense of the model. It's too much of a toy to be useful. The admonishment "poll implementations must never return NotReady unless they received NotReady by calling an inner future" makes this even more confusing, and really makes me think there is some hidden magic.

I wish I knew what to suggest, but after trying to work through this twice, I'm stuck here. There's something about the model that just hasn't come through in the examples, maybe because I don't come from a Ruby or JavaScript background? Something that programmers with experience there would grok immediately?

carllerche commented 5 years ago

Could you include what part of the docs you reached when asking yourself this question?