changeset 44925:ce8fe77102f4

rust: fix false comment about mpsc::Sender We need Sync to share the Sender reference across threads.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 25 May 2020 23:02:07 +0900
parents 61719b9658b1
children 14125dec0e39
files rust/hg-core/src/dirstate/status.rs
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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