mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
reject SemLock reduce (#6738)
This commit is contained in:
1 parent
a0ace054f3
commit
746e71af87
2 files changed
+7
-8
No files matched your search
@@ -228,13 +228,5 @@ create_executor_tests(globals(), ProcessPoolExecutorTest,
|
||||
def setUpModule():
|
||||
setup_module()
|
||||
|
||||
class ProcessPoolSpawnProcessPoolExecutorTest(ProcessPoolSpawnProcessPoolExecutorTest): # TODO: RUSTPYTHON
|
||||
@unittest.skipIf(sys.platform == 'linux', "TODO: RUSTPYTHON flaky")
|
||||
def test_saturation(self): super().test_saturation() # TODO: RUSTPYTHON
|
||||
|
||||
class ProcessPoolForkProcessPoolExecutorTest(ProcessPoolForkProcessPoolExecutorTest): # TODO: RUSTPYTHON
|
||||
@unittest.skipIf(sys.platform == 'linux', "TODO: RUSTPYTHON flaky")
|
||||
def test_ressources_gced_in_workers(self): super().test_ressources_gced_in_workers() # TODO: RUSTPYTHON
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -547,6 +547,13 @@ mod _multiprocessing {
|
||||
self.last_tid.store(0, Ordering::Release);
|
||||
}
|
||||
|
||||
/// SemLock objects cannot be pickled directly.
|
||||
/// Use multiprocessing.synchronize.SemLock wrapper which handles pickling.
|
||||
#[pymethod]
|
||||
fn __reduce__(&self, vm: &VirtualMachine) -> PyResult {
|
||||
Err(vm.new_type_error("cannot pickle 'SemLock' object".to_owned()))
|
||||
}
|
||||
|
||||
/// Num of `acquire()`s minus num of `release()`s for this process.
|
||||
// _multiprocessing_SemLock__count_impl
|
||||
#[pymethod]
|
||||
|
||||
Reference in new issue
Block a user