📝 clarify async status helper docs

This commit is contained in:
Nanaloveyuki
2026-06-14 02:11:26 +08:00
parent 26de2e81d6
commit f1250512eb
4 changed files with 12 additions and 0 deletions
+3
View File
@@ -36,6 +36,7 @@ Detailed rules explaining key parameters and behaviors
- `run()` clears previous failure state at startup.
- `run()` also clears the stored `last_error()` string at startup before drain work begins.
- If the worker loop raises an error, the logger records that failure and exposes it through this flag.
- Once set by a failed run, the flag stays `true` until a later `run()` start resets it.
- This helper is intentionally compact and should usually be paired with `last_error()` for details.
- Failure state is about runtime drain execution, not whether records were dropped due to overflow policy.
@@ -72,6 +73,8 @@ e.g.:
- If `has_failed()` is `true`, callers should inspect `last_error()` or `state()` for more context.
- `close()` or `shutdown()` do not clear this flag by themselves; only a later `run()` start resets it.
### Notes
1. This helper reports worker failure, not general queue stress.