Struct puff_rs::python::PythonDispatcher
source · [−]pub struct PythonDispatcher { /* private fields */ }Implementations
sourceimpl PythonDispatcher
impl PythonDispatcher
pub fn new(context_waiting: Arc<Mutex<Option<PuffContext>>>) -> PyResult<Self>
pub fn blocking() -> PyResult<Self>
sourcepub fn dispatch_blocking<A: IntoPy<Py<PyTuple>>, K: IntoPy<Py<PyDict>>>(
&self,
py: Python<'_>,
function: PyObject,
args: A,
kwargs: K
) -> PyResult<Receiver<PyResult<PyObject>>>
pub fn dispatch_blocking<A: IntoPy<Py<PyTuple>>, K: IntoPy<Py<PyDict>>>(
&self,
py: Python<'_>,
function: PyObject,
args: A,
kwargs: K
) -> PyResult<Receiver<PyResult<PyObject>>>
Run the python function a new Tokio blocking working thread.
sourcepub fn dispatch1<A: IntoPy<Py<PyTuple>> + Send + 'static>(
&self,
function: PyObject,
args: A
) -> PyResult<Receiver<PyResult<PyObject>>>
pub fn dispatch1<A: IntoPy<Py<PyTuple>> + Send + 'static>(
&self,
function: PyObject,
args: A
) -> PyResult<Receiver<PyResult<PyObject>>>
Acquires the GIL and Executes the python function on the greenlet thread or a new thread depending if greenlets were enabled. Takes no keyword arguments
Trait Implementations
sourceimpl Clone for PythonDispatcher
impl Clone for PythonDispatcher
sourcefn clone(&self) -> PythonDispatcher
fn clone(&self) -> PythonDispatcher
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl !RefUnwindSafe for PythonDispatcher
impl Send for PythonDispatcher
impl Sync for PythonDispatcher
impl Unpin for PythonDispatcher
impl UnwindSafe for PythonDispatcher
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more