Updates BackgroundTaskRunner to ensure canceled or skipped tasks are disposed, updated tests to reflect

This commit is contained in:
Shannon
2015-02-04 15:12:37 +11:00
parent 912b01c9aa
commit bc068b201d
4 changed files with 43 additions and 29 deletions

View 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; }
}
}