using System; using Umbraco.Cms.Core; namespace Umbraco.Web.Scheduling { /// /// Defines a service managing a queue of tasks of type and running them in the background. /// /// The type of the managed tasks. /// The interface is not complete and exists only to have the contravariance on T. public interface IBackgroundTaskRunner : IDisposable, IRegisteredObject where T : class, IBackgroundTask { bool IsCompleted { get; } void Add(T task); bool TryAdd(T task); // TODO: complete the interface? } }