docs.rs failed to build spin-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
spin-0.9.8
spinlock-rs
This Rust library implements a simple spinlock.
Build
Just run cargo build
.
Usage
When calling lock
on a Mutex
you will get a reference to the data. When this
reference is dropped, the lock will be unlocked.
extern crate spin;
To share the lock, an Arc<Mutex<T>>
may be used.
Remarks
The behaviour of these lock is similar to their namesakes in std::sync
. they
differ on the following:
- The lock will not be poisoned in case of failure;
- The lock can also be used from a plain thread (such as a bare
pthread
).