소스 검색

Add a couple of comments.

Jing Yang 5 년 전
부모
커밋
160ec79e3c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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)