📝 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()` resets the stored error string when the worker starts.
- If the worker loop fails, the error text is captured from the raised exception.
- An empty string normally means no failure has been recorded.
- Once a failure string is recorded, it stays in place until a later `run()` start clears it.
- This helper reports worker execution errors, not ordinary overflow or backpressure conditions.
- A new successful `run()` attempt clears any previously stored error text before drain work begins again.
@@ -72,6 +73,8 @@ e.g.:
- If callers need broader context than just the error text, they should use `state()`.
- `close()` or `shutdown()` do not clear a previously recorded error string by themselves.
### Notes
1. Read this helper together with `has_failed()` when interpreting worker health.