mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-30 15:04:48 +00:00
📝 clarify async worker capability probe
This commit is contained in:
@@ -36,6 +36,7 @@ Detailed rules explaining key parameters and behaviors
|
|||||||
- `true` indicates native worker capability.
|
- `true` indicates native worker capability.
|
||||||
- `false` indicates compatibility-mode behavior.
|
- `false` indicates compatibility-mode behavior.
|
||||||
- This helper is derived from backend-specific async runtime implementation choice.
|
- This helper is derived from backend-specific async runtime implementation choice.
|
||||||
|
- The boolean is read from the active backend helper on each call rather than from a cached runtime snapshot object.
|
||||||
- In the current backend split, the native implementation returns `true` while the compatibility stub returns `false`, matching the same mode pair exposed through `async_runtime_mode()` and `async_runtime_state()`.
|
- In the current backend split, the native implementation returns `true` while the compatibility stub returns `false`, matching the same mode pair exposed through `async_runtime_mode()` and `async_runtime_state()`.
|
||||||
- The async library still targets multiple backends even when this helper returns `false`.
|
- The async library still targets multiple backends even when this helper returns `false`.
|
||||||
- Use it when an enum branch is unnecessary and a boolean capability check is enough.
|
- Use it when an enum branch is unnecessary and a boolean capability check is enough.
|
||||||
@@ -69,6 +70,8 @@ In this example, a simple boolean can drive compact status output.
|
|||||||
e.g.:
|
e.g.:
|
||||||
- This API does not normally fail at runtime; it reflects compiled backend behavior.
|
- This API does not normally fail at runtime; it reflects compiled backend behavior.
|
||||||
|
|
||||||
|
- If callers need the current paired mode and worker flag together, prefer a fresh `async_runtime_state()` call instead of mixing this boolean with an older saved mode value.
|
||||||
|
|
||||||
- If you need the exact mode name rather than a boolean, use `async_runtime_mode()` or `async_runtime_state()`.
|
- If you need the exact mode name rather than a boolean, use `async_runtime_mode()` or `async_runtime_state()`.
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|||||||
Reference in New Issue
Block a user