From 61507ec1fa61fe134547a7eac9541375c6215b33 Mon Sep 17 00:00:00 2001 From: David Blajda Date: Thu, 20 Dec 2018 00:09:49 +0000 Subject: Replace channel based barrier with shared future based barrier --- src/sync/waiter.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sync/waiter.rs') diff --git a/src/sync/waiter.rs b/src/sync/waiter.rs index 656c42e..8039280 100644 --- a/src/sync/waiter.rs +++ b/src/sync/waiter.rs @@ -1,13 +1,13 @@ use futures::sync::oneshot; use futures::Future; +use futures::future::{Shared, SharedError}; +use crate::error::ConditionError; pub trait Waiter { - type Item: Send + 'static; - type Error: From - + From + From<()> + Send + 'static; - type ConditionError: Send + Clone + 'static; + type Item: Default; + type Error: From>; fn blocked(&self) -> bool; - fn condition_poller(&self) -> Box + Send>; - fn into_future(self) -> Box + Send>; + fn condition(&self) + -> Shared + Send>>; } -- cgit v1.2.3