Playing with various event loops.  Scratch code.