We explore some of the questions surrounding asynchronous
programming and reveal that the need for new constructs, such as
await in C#, isn't due to deep considerations, but results from
the fact that the UI is single threaded. There is currently a
lot of ground-breaking work on the subject of asynchronous
programming and how to make it easier for programmers to make
use of the asynchronous nature of today's environments. The idea
is to restore the correspondence between the programs text and
the order of execution by using some interesting compiler
rewriting techniques. While this is a step forward the real
situation is more complicated. In fact this is a mess of our own
creation and with a little more though no solution would have
been necessary. When the modern GUI was invent some means of
attracting the programs attention to what was going on was
needed. We could have opted for a polling loop. For example a
rule of the UI could have been that every program took the form:
if( any controls active?) Process