MessageQueueTerminateAndWait Method |
Terminates the message queue and waits for termination to complete.
Any messages that are already in the queue when this method is called will be processed before the queue is terminated. Unlike Terminate, this method does not return until the message queue is terminated. This method must not be called from the thread that is running the message queue. Doing so will cause a deadlock, because this method cannot return until the message queue terminates, and the queue cannot terminate until this method returns.
Namespace: AGI.Foundation.Infrastructure.Threading
Exception | Condition |
---|---|
InvalidOperationException | The queue is not started. |