--- src/lib.rs.before
+++ src/lib.rs.experiment
@@ -594,7 +594,10 @@
state: Rc::downgrade(self),
request: r.clone(),
},
- )?;
+ )?
+ .bind(py)
+ .getattr(pyo3::intern!(py, "send"))?
+ .unbind();
let receive = Py::new(
py,
Receiver {
@@ -741,7 +744,7 @@
}
#[pymethods]
impl Sender {
- fn __call__(&self, py: Python<'_>, msg: &Bound<'_, PyDict>) -> PyResult<Py<PyAny>> {
+ fn send(&self, py: Python<'_>, msg: &Bound<'_, PyDict>) -> PyResult<Py<PyAny>> {
let s = self
.state
.upgrade()