use slightly better metric to see if we already have the main thread.

There is no need to create a new Runnable every time.  This will also allow us to bail early in the future if we block for too long.

also, synchronized (...) is re-entrant.