[][src]Crate atomicbox

Safe atomic boxes.

The standard library provides atomic booleans, integers, and pointers. AtomicPtr is safe for loading, storing, and so forth; but pointers are unsafe to use.

It turns out that a safe atomic Box type is possible. Unfortunately, the only operation it supports is swap. Still, this is sufficient for some lock-free data structures, so here it is!

Structs

AtomicBox

A type that holds a single Box<T> value and can be safely shared between threads.

AtomicOptionBox

A type that holds a single Option<Box<T>> value and can be safely shared between threads.