using System; using System.Threading; using Avalonia.Metadata; using Avalonia.Threading; namespace Avalonia.Platform { /// /// Provides platform-specific services relating to threading. /// [Unstable] public interface IPlatformThreadingInterface { void RunLoop(CancellationToken cancellationToken); /// /// Starts a timer. /// /// /// The interval. /// The action to call on each tick. /// An used to stop the timer. IDisposable StartTimer(DispatcherPriority priority, TimeSpan interval, Action tick); void Signal(DispatcherPriority priority); bool CurrentThreadIsLoopThread { get; } event Action Signaled; } }