namespace ManagementApp.AServices.ThreadManage
{ 
    public interface IConcurrentTasks<T>
    {
        ValueTask Add(Func<CancellationToken, ValueTask> value);
  
        ValueTask<Func<CancellationToken, ValueTask>> Search(T key, CancellationToken cancellationToken);

        ValueTask<Func<CancellationToken, ValueTask>> Update(T key, CancellationToken cancellationToken, Func<CancellationToken, ValueTask> value);

    }

    public interface IConcurrentTasks
    {
        ValueTask Add(Func<CancellationToken, ValueTask> value);
        ValueTask<Func<CancellationToken, ValueTask>> Last(CancellationToken cancellationToken);

        ValueTask<Func<CancellationToken, ValueTask>> First(CancellationToken cancellationToken);

    }
}
