Tuesday, October 29, 2013

Couldn't they have picked a better word than "await"?

Except your both overlooking something fundamental, there is no 'wait' involved at all. The calling thread is actually striving to avoid waiting (aka 'blocking') which is why I find the term utterly inappropriate.


The calling thread does indeed start something, it starts an asynchronous operation then promptly exits, resuming execution at the next statement only once the operation completes.


"start" and "begin" are wholly appropriate which is why the earlier asynchronous model (prior to C# 5) had methods names starting with "Begin".


The fact that you thought a wait was taking place only goes to show how misleading "await" is.


Cap'n


No comments:

Post a Comment