Преглед на файлове

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"),