Merge pull request #321 from rukai/fix_readme

This commit is contained in:
Amanieu d'Antras
2022-02-21 23:52:42 +00:00
committed by GitHub
+7 -2
View File
@@ -94,8 +94,13 @@ There are a few restrictions when using this library on stable Rust:
- You will have to use the `const_*` functions (e.g. `const_mutex(val)`) to
statically initialize the locking primitives. Using e.g. `Mutex::new(val)`
does not work on stable Rust yet.
- The `wasm32-unknown-unknown` target is only supported on nightly and requires
`-C target-feature=+atomics` in `RUSTFLAGS`.
- The `wasm32-unknown-unknown` target is only fully supported on nightly with
`-C target-feature=+atomics` in `RUSTFLAGS` and `-Z build-std` passed to cargo.
parking_lot will work mostly fine on stable, the only difference is it will
panic instead of block forever if you hit a deadlock.
Just make sure not to enable `-C target-feature=+atomics` on stable as that
will allow wasm to run with multiple threads which will completely break
parking_lot's concurrency guarantees.
To enable nightly-only functionality, you need to enable the `nightly` feature
in Cargo (see below).