We should signal that the RPC server has stopped before joining any threads to give them a chance to exit cleanly.