Crates.io | try-mutex |
lib.rs | try-mutex |
version | 0.4.2 |
source | src |
created_at | 2018-05-27 14:21:18.072706 |
updated_at | 2022-10-27 16:14:12.527154 |
description | Fast non-blocking mutex |
homepage | |
repository | https://github.com/mpdn/try-mutex |
max_upload_size | |
id | 67281 |
size | 8,418 |
A simple non-blocking mutex (i.e. only try_lock
is supported), using atomics.
Simpler than the one found in stdlib. Does not support poisoning.
This used to be faster than the mutex in the standard library, but benchmarking indicates that optimizations in the standard library means there is no longer a significant difference (on my machine). Be sure to run them on your own machine to compare.
Nevertheless, this library may still be useful for embedded or similar cases.