Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokio Util LongRunningTaskDetector. (https://github.com/tokio-rs/console/issues/150) #6256

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1ea1bb3
First "working" POC.
zolyfarkas Dec 28, 2023
03f3bcc
First "working" POC to implement https://github.com/tokio-rs/console/…
zolyfarkas Dec 28, 2023
9dcefab
Merge branch 'TOKIO-LRTD' of https://github.com/zolyfarkas/tokio into…
zolyfarkas Dec 28, 2023
77c61f5
[cleanup] remove unused method.
zolyfarkas Dec 28, 2023
e6c9c6c
Add ability to hook actions on detection.
zolyfarkas Dec 29, 2023
144cfff
[add] document action traits + minor improvement.
zolyfarkas Dec 30, 2023
6f00e2e
[add] More documentation + test.
zolyfarkas Dec 30, 2023
fb4cc02
[add] one more comment.
zolyfarkas Dec 30, 2023
5247795
[cleanup] fix all warnings + code cleanup.
zolyfarkas Dec 30, 2023
73c8bc5
Fix tests + remove unsafe stuff.
zolyfarkas Dec 30, 2023
6e77b5e
FIX formatting
zolyfarkas Dec 30, 2023
df172e8
Cleanup unnecessary drop.
zolyfarkas Dec 30, 2023
86bbf4c
[fix] doctest
zolyfarkas Dec 30, 2023
f5e1ab0
Merge branch 'master' into TOKIO-LRTD
zolyfarkas Dec 30, 2023
f41f470
Fix formatting issue
zolyfarkas Dec 30, 2023
e978a2c
remove nix dependency
zolyfarkas Dec 31, 2023
ab43c31
Separate out blocking detection from thread state dump.
zolyfarkas Dec 31, 2023
97572a9
Move lrtd into tokio (out of tokio-util)
zolyfarkas Dec 31, 2023
78deaf8
Move lrtd into tokio (out of tokio-util)
zolyfarkas Dec 31, 2023
8a66f5b
Merge branch 'TOKIO-LRTD' of https://github.com/zolyfarkas/tokio into…
zolyfarkas Dec 31, 2023
067b0c4
Fix some merge issue
zolyfarkas Dec 31, 2023
a9f009b
Fix lint issues.
zolyfarkas Dec 31, 2023
22b4df3
Cleanup lint issues.
zolyfarkas Jan 1, 2024
3de7422
FIX more clippy lints
zolyfarkas Jan 1, 2024
a9caaa9
undo some unintended changes
zolyfarkas Jan 1, 2024
3561be9
make is_current_threaded public
zolyfarkas Jan 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tokio-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = ["asynchronous"]
default = []

# Shorthand for enabling everything
full = ["codec", "compat", "io-util", "time", "net", "rt"]
full = ["codec", "compat", "io-util", "time", "net", "rt", "lrtd"]

net = ["tokio/net"]
compat = ["futures-io",]
Expand All @@ -30,6 +30,7 @@ time = ["tokio/time","slab"]
io = []
io-util = ["io", "tokio/rt", "tokio/io-util"]
rt = ["tokio/rt", "tokio/sync", "futures-util", "hashbrown"]
lrtd = []
zolyfarkas marked this conversation as resolved.
Show resolved Hide resolved

__docs_rs = ["futures-util"]

Expand All @@ -43,6 +44,9 @@ futures-util = { version = "0.3.0", optional = true }
pin-project-lite = "0.2.11"
slab = { version = "0.4.4", optional = true } # Backs `DelayQueue`
tracing = { version = "0.1.25", default-features = false, features = ["std"], optional = true }
nix = "0.21"
rand = "0.8"
zolyfarkas marked this conversation as resolved.
Show resolved Hide resolved
libc = "0.2"

[target.'cfg(tokio_unstable)'.dependencies]
hashbrown = { version = "0.14.0", optional = true }
Expand Down
10 changes: 10 additions & 0 deletions tokio-util/src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,13 @@ macro_rules! cfg_time {
)*
}
}

macro_rules! cfg_lrtd {
($($item:item)*) => {
$(
#[cfg(feature = "lrtd")]
#[cfg_attr(docsrs, doc(cfg(feature = "lrtd")))]
$item
)*
}
}
4 changes: 4 additions & 0 deletions tokio-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ cfg_time! {
pub mod time;
}

cfg_lrtd! {
pub mod lrtd;
}

pub mod sync;

pub mod either;
Expand Down
Loading
Loading