mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-31 15:34:58 +00:00
📝 clarify async runtime constructor inputs
This commit is contained in:
@@ -41,6 +41,7 @@ Detailed rules explaining key parameters and behaviors
|
|||||||
- It does not query the current backend automatically.
|
- It does not query the current backend automatically.
|
||||||
- `async_runtime_state()` is the higher-level API that reads these values from the live runtime environment.
|
- `async_runtime_state()` is the higher-level API that reads these values from the live runtime environment.
|
||||||
- It also does not validate whether the supplied pair matches the current backend contract.
|
- It also does not validate whether the supplied pair matches the current backend contract.
|
||||||
|
- The supplied `mode` and `background_worker` values are stored exactly as provided; this constructor does not recompute, normalize, or cross-check either field.
|
||||||
- The constructed value matches the same public shape used by async runtime serializers.
|
- The constructed value matches the same public shape used by async runtime serializers.
|
||||||
- Because `AsyncRuntimeState` is only a data snapshot type, this constructor is mainly useful for tests, adapters, and synthetic diagnostics rather than ordinary runtime probing.
|
- Because `AsyncRuntimeState` is only a data snapshot type, this constructor is mainly useful for tests, adapters, and synthetic diagnostics rather than ordinary runtime probing.
|
||||||
|
|
||||||
@@ -77,6 +78,8 @@ e.g.:
|
|||||||
|
|
||||||
- If callers manually pair `NativeWorker` with `false` or `Compatibility` with `true`, the constructor still accepts that snapshot because it does not enforce backend consistency.
|
- If callers manually pair `NativeWorker` with `false` or `Compatibility` with `true`, the constructor still accepts that snapshot because it does not enforce backend consistency.
|
||||||
|
|
||||||
|
- If callers want the currently probed runtime pair instead of a synthetic one, they must pass `async_runtime_mode()` plus `async_runtime_supports_background_worker()` explicitly or use `async_runtime_state()`.
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
1. Use this helper when code should construct an `AsyncRuntimeState` value explicitly.
|
1. Use this helper when code should construct an `AsyncRuntimeState` value explicitly.
|
||||||
|
|||||||
Reference in New Issue
Block a user