typo fix and doc improvement
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
7fb49397d5
commit
390e83c9b9
@ -49,6 +49,8 @@ pub struct Cancellable<T: Future> {
|
||||
/// Reference to a cancellable future. Multiple instances may exist simultaneously.
|
||||
///
|
||||
/// This allows cancelling another future. If the future already finished, nothing happens.
|
||||
///
|
||||
/// This can be cloned to be used in multiple places.
|
||||
#[derive(Clone)]
|
||||
pub struct Canceller(Arc<Mutex<Option<AsyncLockGuard<()>>>>);
|
||||
|
||||
@ -76,7 +78,7 @@ impl<T: Future> Cancellable<T> {
|
||||
Ok((this, canceller))
|
||||
}
|
||||
|
||||
/// Create another `Canceller` for his future..
|
||||
/// Create another `Canceller` for this future.
|
||||
pub fn canceller(&self) -> Canceller {
|
||||
Canceller(self.guard.clone())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user