add new thread mode for rpc. although performance is poor