Merge remote-tracking branch 'origin/v8/bugfix/examine-reindex' into v8/8.6
(cherry picked from commit 8fddb52f9a)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
3950f3286e
commit
041d0469b6
32
src/Umbraco.Web/Scheduling/SimpleTask.cs
Normal file
32
src/Umbraco.Web/Scheduling/SimpleTask.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Web.Scheduling
|
||||
{
|
||||
/// <summary>
|
||||
/// A simple task that executes a delegate synchronously
|
||||
/// </summary>
|
||||
internal class SimpleTask : IBackgroundTask
|
||||
{
|
||||
private readonly Action _action;
|
||||
|
||||
public SimpleTask(Action action)
|
||||
{
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public bool IsAsync => false;
|
||||
|
||||
public void Run() => _action();
|
||||
|
||||
public Task RunAsync(CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user