17 lines
372 B
C#
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; }
|
|
}
|
|
}
|