sparking-lot-core
s(implified-)parking-lot-core
is a simplified version of parking_lot_core
,
the backend of parking_lot
. It doesn't include timeouts and park or unpark
tokens, and doesn't readjust based on thread count, so going above certain thread
counts (96 by default, 384 with the more-concurrency
feature), will
lead to worse scaling than parking_lot_core
. However, it has static memory usage
and, most importantly, sparking-lot-core
has loom 0.7
support with --cfg loom
for concurrency testing.
Usage
First, add this to your Cargo.toml:
[]
= "0.1"
Then use it:
use ;
use ;
use thread;
loom
loom
is enabled with --cfg loom
. When running loom tests, it's recommended to enable the loom-test
feature, as the default test implementation is severely limited. The old behaviour
is described in the docs.
License
This project is licensed under the MIT LICENSE