Struct promiser::promise::Promise
[−]
[src]
pub struct Promise<T: Send + 'static> { pub data: Arc<UnsafeCell<Option<T>>>, pub init: Latch, pub commit: Latch, }
Fields
data: Arc<UnsafeCell<Option<T>>>
init: Latch
commit: Latch
Methods
impl<T: Send + 'static> Promise<T>
[src]
fn new() -> (Promiser<T>, Promisee<T>)
fn clone(&self) -> Promise<T>
fn deliver(&self, d: T) -> bool
fn _with<W, F: FnMut(&T) -> W>(&self, f: F) -> Result<W, String>
should be called only from promiser/promisee-- public for now tho
fn destroy(&self) -> Result<String, String>
Trait Implementations
impl<T: Clone + Send + 'static> Clone for Promise<T>
[src]
fn clone(&self) -> Promise<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Send> Send for Promise<T>
[src]
impl<T: Sync + Send> Sync for Promise<T>
[src]
impl<T: Send + 'static> Drop for Promise<T>
[src]
Special Drop for Promise we don't want to hang readers on a local panic