Browse Source

Add a comment about threads.

Jing Yang 5 năm trước cách đây
mục cha
commit
92acf0470a
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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,