소스 검색

Add a comment about threads.

Jing Yang 5 년 전
부모
커밋
92acf0470a
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/lib.rs

+ 4 - 0
src/lib.rs

@@ -126,6 +126,10 @@ struct AppendEntriesReply {
 }
 
 impl Raft {
+    /// Create a new raft instance.
+    ///
+    /// Each instance will create at least 3 + (number of peers) threads. The
+    /// extensive usage of threads is to minimize latency.
     pub fn new<Func>(
         peers: Vec<RpcClient>,
         me: usize,