From 17893388feed5f91ebd254ac7ad8e2801ca8a6d0 Mon Sep 17 00:00:00 2001 From: David Blajda Date: Wed, 19 Dec 2018 16:14:14 +0000 Subject: Place barrier and waiters in their own modules --- src/sync/waiter.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/sync/waiter.rs (limited to 'src/sync/waiter.rs') diff --git a/src/sync/waiter.rs b/src/sync/waiter.rs new file mode 100644 index 0000000..656c42e --- /dev/null +++ b/src/sync/waiter.rs @@ -0,0 +1,13 @@ +use futures::sync::oneshot; +use futures::Future; + +pub trait Waiter { + type Item: Send + 'static; + type Error: From + + From + From<()> + Send + 'static; + type ConditionError: Send + Clone + 'static; + + fn blocked(&self) -> bool; + fn condition_poller(&self) -> Box + Send>; + fn into_future(self) -> Box + Send>; +} -- cgit v1.2.3