using System.Threading; namespace ComputeSharp.WinUI; /// /// An interface for a shader runner to be used with . /// public interface IFrameRequestQueue { /// /// Waits for a new frame request to be available, retrieving its parameter, if any. /// /// The input parameter for the frame to render. /// A token to cancel waiting for a new frame. /// /// /// This method should block synchronously until a new frame is available, returning its /// parameters if any. The parameter should be used to cancel a /// blocking operation and return immediately, as it's cancelled when rendering is stopped. /// /// /// For instance, if the implementation is internally using a /// queue and calling /// to block and wait for /// a new frame parameter, the /// overload should be used instead, to enable canceling the operation early if needed. /// /// /// If the runner throws an , this will just be recognized by the /// in use and result in rendering simply being stopped. If any other exceptions are thrown /// instead, they will be interpreted as a failure, and will be raised. /// /// void Dequeue(out object? parameter, CancellationToken token); }