rust: fix false comment about mpsc::Sender
authorYuya Nishihara <yuya@tcha.org>
Mon, 25 May 2020 23:02:07 +0900
changeset 44925 ce8fe77102f4
parent 44916 61719b9658b1
child 44926 14125dec0e39
rust: fix false comment about mpsc::Sender We need Sync to share the Sender reference across threads.
rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs	Wed Jun 03 19:20:18 2020 +0900
+++ b/rust/hg-core/src/dirstate/status.rs	Mon May 25 23:02:07 2020 +0900
@@ -560,7 +560,7 @@
     let root_dir = root_dir.as_ref();
 
     // The traversal is done in parallel, so use a channel to gather entries.
-    // `crossbeam::Sender` is `Send`, while `mpsc::Sender` is not.
+    // `crossbeam::Sender` is `Sync`, while `mpsc::Sender` is not.
     let (files_transmitter, files_receiver) = crossbeam::channel::unbounded();
 
     traverse_dir(
@@ -877,7 +877,7 @@
 
     let files = matcher.file_set();
 
-    // `crossbeam::Sender` is `Send`, while `mpsc::Sender` is not.
+    // `crossbeam::Sender` is `Sync`, while `mpsc::Sender` is not.
     let (traversed_sender, traversed_recv) = crossbeam::channel::unbounded();
 
     // Step 1: check the files explicitly mentioned by the user