| using System; | |
| using System.Threading.Tasks; | |
| namespace OnDeviceAgent.AgentCore | |
| { | |
| public interface IUnityMainThreadDispatcher | |
| { | |
| bool IsOnMainThread { get; } | |
| void Post(Action action); | |
| Task RunOnMainAsync(Func<Task> work); | |
| Task<T> RunOnMainAsync<T>(Func<Task<T>> work); | |
| } | |
| } | |