mirror of
https://github.com/bertptrs/tracing-mutex.git
synced 2025-12-27 13:30:32 +01:00
Compare commits
6 Commits
v0.2.0
...
9ea993e737
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ea993e737 | |||
| 062850fc3e | |||
| 0d2622d5c6 | |||
| d1417e0b0c | |||
| fcc64e2cef | |||
| fd0d05307c |
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@@ -7,7 +7,7 @@ on:
|
|||||||
name: Continuous integration
|
name: Continuous integration
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
tests:
|
||||||
name: Rust project
|
name: Rust project
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
@@ -47,3 +47,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --all-features --all-targets -- -D warnings
|
args: --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
|
docs:
|
||||||
|
name: Documentation build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Build documentation
|
||||||
|
env:
|
||||||
|
# Build the docs like docs.rs builds it
|
||||||
|
RUSTDOCFLAGS: --cfg docsrs
|
||||||
|
run: cargo doc --all-features
|
||||||
|
|||||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -6,7 +6,16 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [0.2.0]
|
### Added
|
||||||
|
|
||||||
|
- Build [docs.rs] documentation with all features enabled for completeness.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- The `parkinglot` module is now correctly enabled by the `parkinglot` feature rather than the
|
||||||
|
`lockapi` feature.
|
||||||
|
|
||||||
|
## [0.2.0] - 2022-05-07
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Generic support for wrapping mutexes that implement the traits provided by the
|
- Generic support for wrapping mutexes that implement the traits provided by the
|
||||||
@@ -61,5 +70,6 @@ Initial release.
|
|||||||
[0.1.1]: https://github.com/bertptrs/tracing-mutex/compare/v0.1.0...v0.1.1
|
[0.1.1]: https://github.com/bertptrs/tracing-mutex/compare/v0.1.0...v0.1.1
|
||||||
[0.1.0]: https://github.com/bertptrs/tracing-mutex/releases/tag/v0.1.0
|
[0.1.0]: https://github.com/bertptrs/tracing-mutex/releases/tag/v0.1.0
|
||||||
|
|
||||||
|
[docs.rs]: https://docs.rs/tracing-mutex/latest/tracing_mutex/
|
||||||
[lock_api]: https://docs.rs/lock_api/
|
[lock_api]: https://docs.rs/lock_api/
|
||||||
[parking_lot]: https://docs.rs/parking_lot/
|
[parking_lot]: https://docs.rs/parking_lot/
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ description = "Ensure deadlock-free mutexes by allocating in order, or else."
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/bertptrs/tracing-mutex"
|
repository = "https://github.com/bertptrs/tracing-mutex"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
# Build docs for all features so the documentation is more complete
|
||||||
|
all-features = true
|
||||||
|
# Set custom cfg so we can enable docs.rs magic
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
lock_api = { version = "0.4", optional = true }
|
lock_api = { version = "0.4", optional = true }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright © 2021 Bert Peters
|
Copyright © 2022 Bert Peters
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
associated documentation files (the “Software”), to deal in the Software without restriction,
|
associated documentation files (the “Software”), to deal in the Software without restriction,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Add this dependency to your `Cargo.lock` file like any other:
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tracing-mutex = "0.1"
|
tracing-mutex = "0.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use the locks provided by this library instead of the ones you would use otherwise.
|
Then use the locks provided by this library instead of the ones you would use otherwise.
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
//! enabled, and to the underlying mutex when they're not.
|
//! enabled, and to the underlying mutex when they're not.
|
||||||
//!
|
//!
|
||||||
//! [paper]: https://whileydave.com/publications/pk07_jea/
|
//! [paper]: https://whileydave.com/publications/pk07_jea/
|
||||||
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::cell::UnsafeCell;
|
use std::cell::UnsafeCell;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
@@ -61,16 +62,20 @@ use std::sync::PoisonError;
|
|||||||
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
#[cfg(feature = "lockapi")]
|
#[cfg(feature = "lockapi")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "lockapi")))]
|
||||||
pub use lock_api;
|
pub use lock_api;
|
||||||
#[cfg(feature = "parkinglot")]
|
#[cfg(feature = "parkinglot")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "parkinglot")))]
|
||||||
pub use parking_lot;
|
pub use parking_lot;
|
||||||
|
|
||||||
use crate::graph::DiGraph;
|
use crate::graph::DiGraph;
|
||||||
|
|
||||||
mod graph;
|
mod graph;
|
||||||
#[cfg(feature = "lockapi")]
|
#[cfg(feature = "lockapi")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "lockapi")))]
|
||||||
pub mod lockapi;
|
pub mod lockapi;
|
||||||
#[cfg(feature = "lockapi")]
|
#[cfg(feature = "parkinglot")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "parkinglot")))]
|
||||||
pub mod parkinglot;
|
pub mod parkinglot;
|
||||||
pub mod stdsync;
|
pub mod stdsync;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user