Method WaitUntilSettledAsync
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
WaitUntilSettledAsync(TimeSpan?, CancellationToken)
Waits until the model has applied everything that has arrived and has nothing left to read.
public Task WaitUntilSettledAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
timeoutTimeSpan?How long to wait, or null (or InfiniteTimeSpan) to wait for as long as it takes. It can be up to 24 days.
cancellationTokenCancellationTokenA token that ends the wait.
Returns
Remarks
OBS Studio announces a change with an event, which can arrive a few milliseconds after the response to the request that made the change. An event that OBS Studio has not sent yet cannot be waited for: this waits for what has arrived.
Exceptions
- ArgumentOutOfRangeException
timeoutis negative, or longer than 24 days.- ObsNotConnectedException
There is no connection (or it ended during the wait).
- TimeoutException
The model was not up to date within the time.
- OperationCanceledException
cancellationTokenwas cancelled.