Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Co-authored-by: Motoyuki Kimura <moymoymox@gmail.com>
  • Loading branch information
2 people authored and Ariel Ben-Yehuda committed Dec 5, 2024
1 parent 8bc4216 commit f579f98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
3 changes: 2 additions & 1 deletion spellcheck.dic
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
297
298
&
+
<
Expand Down Expand Up @@ -31,6 +31,7 @@
50ms
8MB
ABI
accessors
adaptor
adaptors
Adaptors
Expand Down
22 changes: 7 additions & 15 deletions tokio/src/runtime/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@ struct Address(*mut std::ffi::c_void);
unsafe impl Send for Address {}
unsafe impl Sync for Address {}

/// A backtrace symbol. This is similar to [`backtrace::BacktraceSymbol`],
/// but is a separate struct to avoid public dependency issues.
/// A backtrace symbol.
///
/// This struct is guaranteed to be pure data and operations involving
/// it will not call platform functions that take an unpredictable amount
/// of time to finish.
/// This struct provides accessors for backtrace symbols, similar to [`backtrace::BacktraceSymbol`].
#[derive(Clone, Debug)]
pub struct BacktraceSymbol {
name: Option<Box<[u8]>>,
Expand Down Expand Up @@ -106,12 +103,9 @@ impl BacktraceSymbol {
}
}

/// A backtrace frame. This is similar to [`backtrace::BacktraceFrame`],
/// but is a separate struct to avoid public dependency issues.
/// A backtrace frame.
///
/// This struct is guaranteed to be pure data and operations involving
/// it will not call platform functions that take an unpredictable amount
/// of time to finish.
/// This struct represents one stack frame in a captured backtrace, similar to [`backtrace::BacktraceFrame`].
#[derive(Clone, Debug)]
pub struct BacktraceFrame {
ip: Address,
Expand Down Expand Up @@ -154,12 +148,9 @@ impl BacktraceFrame {
}
}

/// A backtrace. This is similar to [`backtrace::Backtrace`],
/// but is a separate struct to avoid public dependency issues.
/// A captured backtrace.
///
/// This struct is guaranteed to be pure data and operations involving
/// it will not call platform functions that take an unpredictable amount
/// of time to finish.
/// This struct provides access to each backtrace frame, similar to [`backtrace::Backtrace`].
#[derive(Clone, Debug)]
pub struct Backtrace {
frames: Box<[BacktraceFrame]>,
Expand All @@ -176,6 +167,7 @@ impl Backtrace {
/// An execution trace of a task's last poll.
///
/// <div class="warning">
///
/// Resolving a backtrace, either via the [`Display`][std::fmt::Display] impl or via
/// [`resolve_backtraces`][Trace::resolve_backtraces], parses debuginfo, which is
/// possibly a CPU-expensive operation that can take a platform-specific but
Expand Down

0 comments on commit f579f98

Please sign in to comment.