docs(#2270): soften take_wake_suppressed one-shot claim per argus review
Argus flagged the doc comment overclaiming no risk of a stale suppression leaking onto a reused task id — narrow the wording to match the acknowledged race in run_task's completion handler.
This commit is contained in:
parent
01cba3c665
commit
5e489b0880
1 changed files with 6 additions and 4 deletions
|
|
@ -88,10 +88,12 @@ pub(crate) fn suppress_wake(id: &str) {
|
|||
}
|
||||
|
||||
/// Consume (remove + report) `id`'s suppression flag. Returns `true` if the
|
||||
/// wake should be skipped. One-shot: a task id is only ever completed once,
|
||||
/// so there's no risk of a stale suppression leaking onto a later task with
|
||||
/// the same id (names are only reusable once the prior task has finished,
|
||||
/// i.e. after this has already been consumed).
|
||||
/// wake should be skipped. One-shot by intent: a completed task's entry is
|
||||
/// meant to be drained exactly once. There's a known low-probability race
|
||||
/// (see `run_task`'s completion handler) where `suppress_wake` for a task
|
||||
/// fires *after* this has already run for it — if the same name gets reused
|
||||
/// before that late insert lands, the dangling flag could suppress the new
|
||||
/// task's wake instead. Not eliminated, just narrow.
|
||||
fn take_wake_suppressed(id: &str) -> bool {
|
||||
wake_suppressed().lock().unwrap().remove(id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue