Updates BackgroundTaskRunner to ensure canceled or skipped tasks are disposed, updated tests to reflect
This commit is contained in:
23
src/Umbraco.Web/Scheduling/BackgroundTaskRunnerOptions.cs
Normal file
23
src/Umbraco.Web/Scheduling/BackgroundTaskRunnerOptions.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Umbraco.Web.Scheduling
|
||||
{
|
||||
internal class BackgroundTaskRunnerOptions
|
||||
{
|
||||
//TODO: Could add options for using a stack vs queue if required
|
||||
|
||||
public BackgroundTaskRunnerOptions()
|
||||
{
|
||||
DedicatedThread = false;
|
||||
PersistentThread = false;
|
||||
OnlyProcessLastItem = false;
|
||||
}
|
||||
|
||||
public bool DedicatedThread { get; set; }
|
||||
public bool PersistentThread { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If this is true, the task runner will skip over all items and only process the last/final
|
||||
/// item registered
|
||||
/// </summary>
|
||||
public bool OnlyProcessLastItem { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user