When the main loop generator exits, set stop flag
When the main loop generator exits, set stop flag

This is to match the intent - which is to run one generator and then
stop. This may in itself be changed at some point (for example to handle
certain sorts of state machine better - RTSP springs to mind), but for
now this seems a reasonable plan. (It's better than the thread
continuing to run but not actually have any work to do!)

sparkslabs/guild,sparkslabs/guild,sparkslabs/guild