docs.rs failed to build ruspiro-lock-0.4.3
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:
ruspiro-lock-0.5.0
RusPiRo Lock crate
API providing simple to use locks:
Spinlock
: blocking lockSemaphore
: atomic lock counter blocking or non-blockingMutex
: blocking lock to ensure mutual exclusive to its interior.RWLock
: blocking lock to provide multiple immutable and exclusive mutable access to its interior.
Usage
To use this crate simply add the dependency to your Cargo.toml
file:
[]
= "0.4.3"
Once done the definition and usage of the locks is as follows. Keep in mind to share those locking primitives accross cores or threads they should be wrapped in an Arc
.
Spinlock
use Spinlock;
Semaphore
use Semaphore;
Mutex
use Mutex;
RWLock
use RWLock;
License
Licensed under Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or MIT (LICENSE-MIT or http://opensource.org/licenses/MIT)) at your choice.