##// END OF EJS Templates
rust-cpython: mark PySharedState as Sync so &'PySharedState can be Send...
Yuya Nishihara -
r43445:a1908eb0 default
parent child Browse files
Show More
@@ -33,6 +33,10 b' pub struct PySharedState {'
33 mutably_borrowed: Cell<bool>,
33 mutably_borrowed: Cell<bool>,
34 }
34 }
35
35
36 // &PySharedState can be Send because any access to inner cells is
37 // synchronized by the GIL.
38 unsafe impl Sync for PySharedState {}
39
36 impl PySharedState {
40 impl PySharedState {
37 pub fn borrow_mut<'a, T>(
41 pub fn borrow_mut<'a, T>(
38 &'a self,
42 &'a self,
General Comments 0
You need to be logged in to leave comments. Login now