withThread: block asynchronous exceptions before installing exception handler.