You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently AGS uses a cancellation token to stop execution. This cancellation_token is not necessarily honored down the stack (I have seen scenarious where speaker selection logic continues even after cancellation token is cancelled).
The right way to stop execution would be to use an external termination condition.
How
Component factory .. can take an external_terminationExternalTermination arg (similar to input_func)
This external_termination if exisists is added to the termination condition as an or + . termination_condition = termination_condition | external_termination
AGS app (team_manager) and websocket connection provide this external_termination and then call external_termination.set() when a stop message is received, instead of invalidating a cancellation token.
This setup could also provide some infrascture to "pause" a run, where a pause is a stop with some timeout ...
stop message sent from UI
external termination condition is set ... a timeout starts on backend and front end
if a new message or resume message is sent within that timeout, team.run() is called again .. and things resume ...
What
Currently AGS uses a cancellation token to stop execution. This cancellation_token is not necessarily honored down the stack (I have seen scenarious where speaker selection logic continues even after cancellation token is cancelled).
The right way to stop execution would be to use an external termination condition.
How
external_termination
ExternalTermination arg (similar to input_func)termination_condition = termination_condition | external_termination
external_termination
and then callexternal_termination.set()
when a stop message is received, instead of invalidating a cancellation token.This setup could also provide some infrascture to "pause" a run, where a pause is a stop with some timeout ...
cc: @ekzhu , @husseinmozannar
The text was updated successfully, but these errors were encountered: