소스 검색

Run the clerk RPC in the same thread.

Clerk uses a blocking model. No need to add more threads.
Jing Yang 4 년 전
부모
커밋
3f13b5674e
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      kvraft/src/client.rs

+ 1 - 3
kvraft/src/client.rs

@@ -85,9 +85,7 @@ impl ClerkInner {
             last_server_index: AtomicUsize::new(0),
             unique_id: UniqueIdSequence::new(),
 
-            executor: tokio::runtime::Builder::new_multi_thread()
-                .thread_name("kvraft-clerk")
-                .worker_threads(1)
+            executor: tokio::runtime::Builder::new_current_thread()
                 .enable_time()
                 .build()
                 .expect("Creating thread pool should not fail"),