A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
938 B

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