rust/hg-cpython/src/ref_sharing.rs
changeset 43175 a1908eb08342
parent 43174 1c675c5fe5fe
child 43176 aaec70a5f9a8
--- a/rust/hg-cpython/src/ref_sharing.rs	Sat Sep 14 23:17:19 2019 +0900
+++ b/rust/hg-cpython/src/ref_sharing.rs	Tue Sep 17 07:59:25 2019 +0900
@@ -33,6 +33,10 @@
     mutably_borrowed: Cell<bool>,
 }
 
+// &PySharedState can be Send because any access to inner cells is
+// synchronized by the GIL.
+unsafe impl Sync for PySharedState {}
+
 impl PySharedState {
     pub fn borrow_mut<'a, T>(
         &'a self,