Эх сурвалжийг харах

Run the clerk RPC in the same thread.

Clerk uses a blocking model. No need to add more threads.
Jing Yang 4 жил өмнө
parent
commit
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"),