using Speckle.Connectors.Utils.Operations;
namespace Speckle.Connectors.DUI.Bridge;
///
/// Implements the interface and runs a given function on the current thread using Task.Run.
///
public class SyncToCurrentThread : ISyncToThread
{
///
/// Executes a given function on the current thread using Task.Run.
///
/// The return type of the function.
/// The function to execute.
/// A Task object representing the asynchronous operation.
public Task RunOnThread(Func func) => Task.FromResult(func.Invoke());
}