divan/RMuseum/Services/IBackgroundTaskQueue.cs
2020-11-26 10:17:16 +03:30

17 lines
372 B
C#

using System;
using System.Threading;
using System.Threading.Tasks;
namespace RMuseum.Services
{
public interface IBackgroundTaskQueue
{
void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem);
Task<Func<CancellationToken, Task>> DequeueAsync(
CancellationToken cancellationToken);
int Count { get; }
}
}