Compare commits
5 Commits
v0.7.0
...
08651fca61
Author | SHA1 | Date | |
---|---|---|---|
|
08651fca61 | ||
0f8fd2343e | |||
12c00941b5 | |||
72755f9cf1 | |||
ae0b8b703e
|
11
CHANGELOG.md
11
CHANGELOG.md
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.7.2] - 2024-11-30
|
||||||
|
|
||||||
|
### Other
|
||||||
|
- *(deps)* update rust crate tracing-subscriber to v0.3.19 (#15)
|
||||||
|
- *(deps)* update rust crate tracing to v0.1.41 (#13)
|
||||||
|
|
||||||
|
## [0.7.1] - 2024-11-24
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- make sure to close on final
|
||||||
|
|
||||||
## [0.7.0] - 2024-11-24
|
## [0.7.0] - 2024-11-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
18
Cargo.lock
generated
18
Cargo.lock
generated
@@ -266,7 +266,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notmad"
|
name = "notmad"
|
||||||
version = "0.6.0"
|
version = "0.7.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -597,9 +597,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing"
|
name = "tracing"
|
||||||
version = "0.1.40"
|
version = "0.1.41"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
@@ -609,9 +609,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-attributes"
|
name = "tracing-attributes"
|
||||||
version = "0.1.27"
|
version = "0.1.28"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -620,9 +620,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-core"
|
name = "tracing-core"
|
||||||
version = "0.1.32"
|
version = "0.1.33"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"valuable",
|
"valuable",
|
||||||
@@ -641,9 +641,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-subscriber"
|
name = "tracing-subscriber"
|
||||||
version = "0.3.18"
|
version = "0.3.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
|
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"matchers",
|
"matchers",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
|
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.7.0"
|
version = "0.7.2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
mad = { path = "crates/mad" }
|
mad = { path = "crates/mad" }
|
||||||
|
@@ -160,18 +160,20 @@ impl Mad {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tokio::spawn({
|
tokio::spawn({
|
||||||
let cancellation_token = cancellation_token.child_token();
|
let cancellation_token = cancellation_token;
|
||||||
let job_done = job_done.child_token();
|
let job_done = job_done.child_token();
|
||||||
|
|
||||||
let wait_cancel = self.should_cancel;
|
let wait_cancel = self.should_cancel;
|
||||||
|
|
||||||
async move {
|
async move {
|
||||||
let should_cancel =
|
let should_cancel =
|
||||||
|cancel: CancellationToken, wait: Option<std::time::Duration>| async move {
|
|cancel: CancellationToken,
|
||||||
|
global_cancel: CancellationToken,
|
||||||
|
wait: Option<std::time::Duration>| async move {
|
||||||
if let Some(cancel_wait) = wait {
|
if let Some(cancel_wait) = wait {
|
||||||
tokio::time::sleep(cancel_wait).await;
|
|
||||||
|
|
||||||
cancel.cancel();
|
cancel.cancel();
|
||||||
|
tokio::time::sleep(cancel_wait).await;
|
||||||
|
global_cancel.cancel();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -180,13 +182,13 @@ impl Mad {
|
|||||||
job_cancellation.cancel();
|
job_cancellation.cancel();
|
||||||
}
|
}
|
||||||
_ = job_done.cancelled() => {
|
_ = job_done.cancelled() => {
|
||||||
should_cancel(job_cancellation, wait_cancel).await;
|
should_cancel(job_cancellation, cancellation_token, wait_cancel).await;
|
||||||
}
|
}
|
||||||
_ = tokio::signal::ctrl_c() => {
|
_ = tokio::signal::ctrl_c() => {
|
||||||
should_cancel(job_cancellation, wait_cancel).await;
|
should_cancel(job_cancellation, cancellation_token,wait_cancel).await;
|
||||||
}
|
}
|
||||||
_ = signal_unix_terminate() => {
|
_ = signal_unix_terminate() => {
|
||||||
should_cancel(job_cancellation, wait_cancel).await;
|
should_cancel(job_cancellation, cancellation_token, wait_cancel).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user