using System;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Controller.LibraryTaskScheduler;
///
/// Provides a shared scheduler to run library related tasks based on the .
///
public interface ILimitedConcurrencyLibraryScheduler
{
///
/// Enqueues an action that will be invoked with the set data.
///
/// The data Type.
/// The data.
/// The callback to process the data.
/// A progress reporter.
/// Stop token.
/// A task that finishes when all data has been processed by the worker.
Task Enqueue(T[] data, Func, Task> worker, IProgress progress, CancellationToken cancellationToken);
}