Prechádzať zdrojové kódy

Add a couple of comments.

Jing Yang 5 rokov pred
rodič
commit
160ec79e3c
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      src/network.rs

+ 2 - 0
src/network.rs

@@ -244,8 +244,10 @@ impl Network {
             .take()
             .expect("Newly created network should have a rx");
 
+        // Using Mutex instead of RWLock, because most of the access are reads.
         let network = Arc::new(Mutex::new(network));
 
+        // Using tokio instead of futures-rs, because we need timer futures.
         let thread_pool = tokio::runtime::Builder::new()
             .threaded_scheduler()
             .core_threads(10)