Constructs a new AsyncManager and loads the handler map.
The ISGNTask node associated with this manager.
Private
commandMap of command handler classes by scope.
Private
commandInstantiated command handlers by scope.
Private
commandRegistry of active async commands by ID.
Private
eventDispatcher for sending async events to the appropriate task node.
Private
eventQueue for managing async events.
Private
fpsTimer for measuring frame deltas.
Private
functionMap of function names by scope.
Private
loopLoop frequency in milliseconds for the main loop.
Private
portMessage port for receiving commands (Roku platform).
Optional
runInterval handle for the web run loop.
Private
systemInjected system service for ticking system-level operations.
The task node associated with this manager.
Private
timerInjected timer service for ticking timer-based operations.
Cancels a command by its ID, invoking its cancellation token and removing it from the registry.
The ID of the command to cancel.
Completes a command by dispatching its event and removing it from the registry.
The async event to complete the command with.
Sets up observers and starts the run loop for the Web platform.
Initializes the async environment, registering fetch, event dispatcher, and event queue.
Private
loadLoads the handler map and function map for command dispatching.
Handles command changes from the task node.
The ROSG node event containing the async command.
Private
processProcesses an incoming async command, instantiating and invoking the appropriate handler.
The async command to process.
Registers a command in the command registry and assigns a cancellation token.
The async command to register.
Starts the main loop for processing async commands and events. Adapts to Roku or Web platform.
Main loop for ticking system and timer services, and processing commands (Roku).
Main loop for ticking system and timer services (Web).
AsyncManager is responsible for managing the lifecycle and execution of asynchronous commands and events.
Remarks