Quellcode durchsuchen

Add a couple of comments.

Jing Yang vor 5 Jahren
Ursprung
Commit
160ec79e3c
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  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)