Class AsyncState
Which call an AsyncVectorEnv<TObs, TAct> is waiting on: none (Default), or the
reset, step or call sent by its _async method, whose results the matching
_wait collects. Starting another call or waiting on the wrong one fails with
AlreadyPendingCallError or NoAsyncCallError, whose
Name is the pending call's Value.
public sealed class AsyncState
- Inheritance
-
AsyncState
- Inherited Members
- Extension Methods
Remarks
A class with four instances rather than a C# enum, as AutoresetMode is, so it
behaves as Python's Enum where it shows: compared by identity, named WAITING_STEP, valued
"step" (the word Gymnasium's messages print, Calling `step_async` while waiting for a pending call to
`step` to complete.), printed <AsyncState.WAITING_STEP: 'step'>.
Reference: gymnasium/vector/async_vector_env.py.
Fields
Default
Gymnasium's AsyncState.DEFAULT: no call pending; any *_async may start one.
public static readonly AsyncState Default
Field Value
WaitingCall
Gymnasium's AsyncState.WAITING_CALL: call_async was sent; call_wait collects it.
public static readonly AsyncState WaitingCall
Field Value
WaitingReset
Gymnasium's AsyncState.WAITING_RESET: reset_async was sent; reset_wait collects it.
public static readonly AsyncState WaitingReset
Field Value
WaitingStep
Gymnasium's AsyncState.WAITING_STEP: step_async was sent; step_wait collects it.
public static readonly AsyncState WaitingStep
Field Value
Properties
All
Every member, in Gymnasium's order.
public static IReadOnlyList<AsyncState> All { get; }
Property Value
Name
Python's .name: DEFAULT, WAITING_RESET, WAITING_STEP or WAITING_CALL.
public string Name { get; }
Property Value
Str
Python's str(state): AsyncState.WAITING_STEP.
public string Str { get; }
Property Value
Value
Python's .value: "default", "reset", "step" or "call", the word the pending-call messages print.
public string Value { get; }
Property Value
Methods
ToString()
Python's repr of the member: <AsyncState.WAITING_STEP: 'step'>.
public override string ToString()
Returns
- string
The text.