Reduce scope of global lock with RPC calls.