pub fn reduce_shared<'py>(
py: Python<'py>,
py_shared: &Bound<'py, PyShared>,
) -> PyResult<(Bound<'py, PyAny>, Bound<'py, PyTuple>)>Expand description
Reduce a PyShared for pickling.
This function implements the pickle protocol for PyShared:
- If the shared is already finished, return (Shared.from_value, (value,))
- If pending pickles are allowed, push it as a pending pickle and return (pop_pending_pickle, ())
- Otherwise, block on the shared and return (Shared.from_value, (value,))