X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions Lib/test/test_concurrent_futures/test_process_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,5 @@ def mock_start_new_thread(func, *args, **kwargs):
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 changes: 7 additions & 0 deletions crates/stdlib/src/multiprocessing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading
X Tutup