Struct swapper::Swapper [] [src]

pub struct Swapper<T> { /* fields omitted */ }

A concurrency control for swapping ownership between threads.

Methods

impl<T: Send> Swapper<T>
[src]

[src]

Swap data.

If the other half of the swap pair is blocked waiting to swap, then it swaps ownership of the data, then unblocks the other thread. Otherwise it blocks waiting to swap.

Trait Implementations

impl<T: Send> Send for Swapper<T>
[src]