Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
2ba8bdb1
Unverified
Commit
2ba8bdb1
authored
Oct 10, 2025
by
Ryan McCormick
Committed by
GitHub
Oct 10, 2025
Browse files
fix: Remove flaky doctest (#3560)
parent
2d0dab74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
21 deletions
+2
-21
lib/runtime/src/utils/tasks/tracker.rs
lib/runtime/src/utils/tasks/tracker.rs
+2
-21
No files found.
lib/runtime/src/utils/tasks/tracker.rs
View file @
2ba8bdb1
...
@@ -492,27 +492,8 @@ impl<T> TaskHandle<T> {
...
@@ -492,27 +492,8 @@ impl<T> TaskHandle<T> {
///
///
/// This token is a child of the tracker's cancellation token and can be used
/// This token is a child of the tracker's cancellation token and can be used
/// to cancel just this individual task without affecting other tasks.
/// to cancel just this individual task without affecting other tasks.
///
// FIXME: The doctest previously here failed intermittently and may
/// # Example
// indicate a bug in either the doctest example or the implementation.
/// ```rust
/// # use dynamo_runtime::utils::tasks::tracker::*;
/// # #[tokio::main]
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
/// # let tracker = TaskTracker::new(UnlimitedScheduler::new(), LogOnlyPolicy::new())?;
/// let handle = tracker.spawn(async {
/// tokio::time::sleep(std::time::Duration::from_secs(10)).await;
/// Ok("completed")
/// });
///
/// // Cancel this specific task
/// handle.cancellation_token().cancel();
///
/// // Task will be cancelled
/// let result = handle.await?;
/// assert!(result.is_err());
/// # Ok(())
/// # }
/// ```
pub
fn
cancellation_token
(
&
self
)
->
&
CancellationToken
{
pub
fn
cancellation_token
(
&
self
)
->
&
CancellationToken
{
&
self
.cancel_token
&
self
.cancel_token
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment