Still sounds dubious to me. Then why has this pattern not emerged as best practice long ago?
And, frankly, I'd be curious to see a snippet of code in that style.
And, frankly, I'd be curious to see a snippet of code in that style.
the reason it hasn't surfaced as a best practice yet is probably because best practices for async programming haven't been a hot topic yet either.
and the point is exactly that a snippet doesn't fit the bill. its easy to abstract complexity on a snippet. its only with the full fledged solution that you start to see best practices emerging and making a difference.