reject SemLock reduce (#6738)

This commit is contained in:
Jeong, YunWon authored and GitHub committed 2026-01-16 10:18:31 +09:00
1 parent a0ace054f3
commit 746e71af87
2 files changed
+7 -8

No files matched your search

-8
View File
@@ -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()
+7
View File
@@ -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]