AgentChat.SetActivityOrThrow Method

Definition

Checks to ensure the chat is not concurrently active and throws an exception if it is. If not, activity is signaled.

protected void SetActivityOrThrow();
member this.SetActivityOrThrow : unit -> unit
Protected Sub SetActivityOrThrow ()

Remarks

Rather than allowing concurrent invocation to result in undefined behavior or failure, it's preferred to fail fast to avoid side effects or state mutation. The activity signal is used to manage ability and visibility for taking actions based on conversation history.

Applies to