I think I have just realized that this still isn’t good enough. Now we know that there aren’t any more events, but it is conceivable that a Runnable
executing just before the token Runnable
has started new threads. Those threads could fail, or add new “token” Runnable
s. It seems like the whole thing needs to be put in a loop.