mirror of
https://github.com/bertptrs/tracing-mutex.git
synced 2025-12-25 20:50:32 +01:00
Compare commits
3 Commits
9a79b53147
...
c29ccc4f4d
| Author | SHA1 | Date | |
|---|---|---|---|
| c29ccc4f4d | |||
| 8ec32bdf16 | |||
| ccc4c98791 |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -30,6 +30,8 @@ jobs:
|
|||||||
|
|
||||||
# Make sure we test with recent deps
|
# Make sure we test with recent deps
|
||||||
- run: cargo update
|
- run: cargo update
|
||||||
|
# Note: some crates broke BC with 1.74 so we use the locked deps
|
||||||
|
if: "${{ matrix.rust != '1.74' }}"
|
||||||
- run: cargo build --all-features --all-targets
|
- run: cargo build --all-features --all-targets
|
||||||
- run: cargo test --all-features
|
- run: cargo test --all-features
|
||||||
- run: cargo fmt --all -- --check
|
- run: cargo fmt --all -- --check
|
||||||
@@ -46,7 +48,7 @@ jobs:
|
|||||||
toolchain: "1.70"
|
toolchain: "1.70"
|
||||||
|
|
||||||
# Test everything except experimental features.
|
# Test everything except experimental features.
|
||||||
- run: cargo test --features backtraces,lockapi,parkinglot
|
- run: cargo test --features backtraces,lock_api,parking_lot
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
name: Documentation build
|
name: Documentation build
|
||||||
|
|||||||
@@ -38,9 +38,12 @@ required-features = ["parkinglot"]
|
|||||||
default = ["backtraces"]
|
default = ["backtraces"]
|
||||||
backtraces = []
|
backtraces = []
|
||||||
experimental = []
|
experimental = []
|
||||||
# Feature names do not match crate names pending namespaced features.
|
lock_api = ["dep:lock_api"]
|
||||||
lockapi = ["lock_api"]
|
parking_lot = ["dep:parking_lot", "lock_api"]
|
||||||
parkinglot = ["parking_lot", "lockapi"]
|
|
||||||
|
# Deprecated feature names from when cargo couldn't distinguish between dep and feature
|
||||||
|
lockapi = ["dep:lock_api"]
|
||||||
|
parkinglot = ["dep:parking_lot", "lock_api"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
autocfg = "1.4.0"
|
autocfg = "1.4.0"
|
||||||
|
|||||||
26
src/lib.rs
26
src/lib.rs
@@ -84,23 +84,33 @@ use std::sync::MutexGuard;
|
|||||||
use std::sync::OnceLock;
|
use std::sync::OnceLock;
|
||||||
use std::sync::PoisonError;
|
use std::sync::PoisonError;
|
||||||
|
|
||||||
#[cfg(feature = "lockapi")]
|
#[cfg(feature = "lock_api")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "lockapi")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "lockapi")))]
|
||||||
|
#[deprecated = "The top-level re-export `lock_api` is deprecated. Use `tracing_mutex::lockapi::raw` instead"]
|
||||||
pub use lock_api;
|
pub use lock_api;
|
||||||
#[cfg(feature = "parkinglot")]
|
#[cfg(feature = "parking_lot")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "parkinglot")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "parkinglot")))]
|
||||||
|
#[deprecated = "The top-level re-export `parking_lot` is deprecated. Use `tracing_mutex::parkinglot::raw` instead"]
|
||||||
pub use parking_lot;
|
pub use parking_lot;
|
||||||
|
|
||||||
|
use graph::DiGraph;
|
||||||
use reporting::Dep;
|
use reporting::Dep;
|
||||||
use reporting::Reportable;
|
use reporting::Reportable;
|
||||||
|
|
||||||
use crate::graph::DiGraph;
|
|
||||||
|
|
||||||
mod graph;
|
mod graph;
|
||||||
#[cfg(feature = "lockapi")]
|
#[cfg(any(feature = "lock_api", feature = "lockapi"))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "lockapi")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "lock_api")))]
|
||||||
|
#[cfg_attr(
|
||||||
|
all(not(docsrs), feature = "lockapi", not(feature = "lock_api")),
|
||||||
|
deprecated = "The `lockapi` feature has been renamed `lock_api`"
|
||||||
|
)]
|
||||||
pub mod lockapi;
|
pub mod lockapi;
|
||||||
#[cfg(feature = "parkinglot")]
|
#[cfg(any(feature = "parking_lot", feature = "parkinglot"))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "parkinglot")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "parking_lot")))]
|
||||||
|
#[cfg_attr(
|
||||||
|
all(not(docsrs), feature = "parkinglot", not(feature = "parking_lot")),
|
||||||
|
deprecated = "The `parkinglot` feature has been renamed `parking_lot`"
|
||||||
|
)]
|
||||||
pub mod parkinglot;
|
pub mod parkinglot;
|
||||||
mod reporting;
|
mod reporting;
|
||||||
pub mod stdsync;
|
pub mod stdsync;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
//! Wrapped mutexes are at least one `usize` larger than the types they wrapped, and must be aligned
|
//! Wrapped mutexes are at least one `usize` larger than the types they wrapped, and must be aligned
|
||||||
//! to `usize` boundaries. As such, libraries with many mutexes may want to consider the additional
|
//! to `usize` boundaries. As such, libraries with many mutexes may want to consider the additional
|
||||||
//! required memory.
|
//! required memory.
|
||||||
|
pub use lock_api as raw;
|
||||||
use lock_api::GuardNoSend;
|
use lock_api::GuardNoSend;
|
||||||
use lock_api::RawMutex;
|
use lock_api::RawMutex;
|
||||||
use lock_api::RawMutexFair;
|
use lock_api::RawMutexFair;
|
||||||
|
|||||||
Reference in New Issue
Block a user