Type arc

type arc<T: const send> = arc_destruct<T>

Type exclusive

type exclusive<T: send> = arc_destruct<ex_data<T>>

Type shared_arc

type shared_arc<T: const send> = (shared_arc_res, get_chan<T>)

Implementation methods for exclusive<T>

Method clone

fn clone() -> exclusive<T>

Method with

unsafe fn with<U>(f: fn(sys::condition, x: &T) -> U) -> U

Implementation methods for port<T>

Method chan

fn chan() -> chan<T>

Method send

fn send(+v: T)

Method recv

fn recv() -> T

Method peek

fn peek() -> bool

Implementation methods for chan<T>

Method chan

fn chan() -> chan<T>

Method send

fn send(+v: T)

Method recv

fn recv() -> T

Method peek

fn peek() -> bool

Implementation methods for lock_and_signal

Method lock

unsafe fn lock<T>(f: fn() -> T) -> T

Method lock_cond

unsafe fn lock_cond<T>(f: fn(condition) -> T) -> T

Implementation methods for condition

Method wait

fn wait()

Method signal

fn signal() -> bool

Function arc

fn arc<T: const send>(-data: T) -> arc<T>

Create an atomically reference counted wrapper.

Function clone

fn clone<T: const send>(rc: &arc<T>) -> arc<T>

Duplicate an atomically reference counted wrapper.

The resulting two arc objects will point to the same underlying data object. However, one of the arc objects can be sent to another task, allowing them to share the underlying data.

Function exclusive

fn exclusive<T: send>(-data: T) -> exclusive<T>

Function get

fn get<T: const send>(rc: &a .arc<T>) -> &a .T

Access the underlying data in an atomically reference counted wrapper.

Function get_arc

fn get_arc<T: send const>(c: get_chan<T>) -> arc::arc<T>

Function shared_arc

fn shared_arc<T: send const>(-data: T) -> shared_arc<T>