Good catch, patch 2 also looks good, thanks.

On 5/25/20 4:27 PM, Yuya Nishihara wrote:
# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1590415327 -32400
#      Mon May 25 23:02:07 2020 +0900
# Node ID 261fbbdabb261a44c0f82537f10abbcc0d85ace1
# Parent  f3b69aecfdc3f6149a30f87bba43396890c2bee7
rust: fix false comment about mpsc::Sender

We need Sync to share the Sender reference across threads.

diff --git a/rust/hg-core/src/dirstate/status.rs 
b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -560,7 +560,7 @@ fn traverse<'a>(
      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 @@ pub fn status<'a: 'c, 'b: 'c, 'c>(
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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to