Skip to content

task_control: added a doc comment for TaskControl#3414

Draft
gurasinghMS wants to merge 3 commits intomicrosoft:mainfrom
gurasinghMS:add-task-control-documentation
Draft

task_control: added a doc comment for TaskControl#3414
gurasinghMS wants to merge 3 commits intomicrosoft:mainfrom
gurasinghMS:add-task-control-documentation

Conversation

@gurasinghMS
Copy link
Copy Markdown
Contributor

Adding some documentation on how TaskControl should be used. The limitations and nuances of when underlying tasks will be cancelled and expected behavior from impl AsyncRun for T.

Copilot AI review requested due to automatic review settings May 1, 2026 19:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds in-crate documentation clarifying the cooperative cancellation model and usage patterns for TaskControl in support/task_control, including guidance for implementing AsyncRun without accidentally dropping in-flight work.

Changes:

  • Expanded TaskControl doc comment to describe lifecycle (insert/start/stop), cooperative cancellation, and interaction with update_with + inspect.
  • Added a no_run rustdoc example showing a recommended AsyncRun pattern (wrap only the “wait for request” await in until_stopped).

@gurasinghMS gurasinghMS marked this pull request as ready for review May 1, 2026 20:02
@gurasinghMS gurasinghMS requested a review from a team as a code owner May 1, 2026 20:02
Copilot AI review requested due to automatic review settings May 1, 2026 20:02
@gurasinghMS gurasinghMS assigned chriso-ms and unassigned chriso-ms May 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@mattkur
Copy link
Copy Markdown
Contributor

mattkur commented May 1, 2026

Looks good, but you may want to also put a note in the until_stopped doc comments as well.

@gurasinghMS gurasinghMS marked this pull request as draft May 1, 2026 22:00
@gurasinghMS
Copy link
Copy Markdown
Contributor Author

John mentioned to move the comment to Async run instead. Will update (don't merge yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants