Struct futures_util::future::RemoteHandle [−][src]
#[must_use = "dropping a remote handle cancels the underlying future"]pub struct RemoteHandle<T> { /* fields omitted */ }
channel only.Expand description
The handle to a remote future returned by
remote_handle. When you drop this,
the remote future will be woken up to be dropped by the executor.
Unwind safety
When the remote future panics, Remote will catch the unwind and transfer it to
the thread where RemoteHandle is being awaited. This is good for the common
case where Remote is spawned on a threadpool. It is unlikely that other code
in the executor working thread shares mutable data with the spawned future and we
preserve the executor from losing its working threads.
If you run the future locally and send the handle of to be awaited elsewhere, you must be careful with regard to unwind safety because the thread in which the future is polled will keep running after the panic and the thread running the RemoteHandle will unwind.
Implementations
impl<T> RemoteHandle<T>[src]
impl<T> RemoteHandle<T>[src]Trait Implementations
impl<T: Debug> Debug for RemoteHandle<T>[src]
impl<T: Debug> Debug for RemoteHandle<T>[src]impl<T: 'static> Future for RemoteHandle<T>[src]
impl<T: 'static> Future for RemoteHandle<T>[src]Auto Trait Implementations
impl<T> !RefUnwindSafe for RemoteHandle<T>
impl<T> Send for RemoteHandle<T> where
T: Send,
T: Send,
impl<T> Sync for RemoteHandle<T> where
T: Send,
T: Send,
impl<T> Unpin for RemoteHandle<T>
impl<T> !UnwindSafe for RemoteHandle<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<F> IntoFuture for F where
F: Future, [src]
impl<F> IntoFuture for F where
F: Future, [src]type Output = <F as Future>::Output
type Output = <F as Future>::Outputinto_future)The output that the future will produce on completion.
type Future = F
type Future = Finto_future)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future[src]
pub fn into_future(self) -> <F as IntoFuture>::Future[src]into_future)Creates a future from a value.