File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1193,7 +1193,7 @@ impl PyObject<dyn PyObjectPayload> {
1193
1193
}
1194
1194
}
1195
1195
1196
- pub trait PyValue : fmt:: Debug + Sized + ' static {
1196
+ pub trait PyValue : fmt:: Debug + Send + Sync + Sized + ' static {
1197
1197
const HAVE_DICT : bool = false ;
1198
1198
1199
1199
fn class ( vm : & VirtualMachine ) -> PyClassRef ;
@@ -1225,12 +1225,8 @@ pub trait PyValue: fmt::Debug + Sized + 'static {
1225
1225
1226
1226
// Temporary trait to follow the progress of threading conversion
1227
1227
pub trait ThreadSafe : Send + Sync { }
1228
- // Temporary hack to help with converting object that contain PyObjectRef to ThreadSafe.
1229
- // Should be removed before threading is allowed. Do not try this at home!!!
1230
- unsafe impl < T : ?Sized + PyObjectPayload > Send for PyObject < T > { }
1231
- unsafe impl < T : ?Sized + PyObjectPayload > Sync for PyObject < T > { }
1232
1228
1233
- pub trait PyObjectPayload : Any + fmt:: Debug + ' static {
1229
+ pub trait PyObjectPayload : Any + fmt:: Debug + Send + Sync + ' static {
1234
1230
fn as_any ( & self ) -> & dyn Any ;
1235
1231
}
1236
1232
You can’t perform that action at this time.
0 commit comments