private InternalScheduleOnce ( System.TimeSpan initialDelay, System.Action action, |
||
initialDelay | System.TimeSpan | |
action | System.Action | |
token | ||
return | void |
private void InternalScheduleOnce(TimeSpan initialDelay, Action action, CancellationToken token)
{
Action executeAction = () =>
{
if (token.IsCancellationRequested)
return;
try
{
action();
}
catch (OperationCanceledException) { }
catch (Exception x)
{
_log.Error(x, "DedicatedThreadScheduler failed to execute action");
}
};
AddWork(initialDelay, executeAction, token);
}
DedicatedThreadScheduler::InternalScheduleOnce ( System.TimeSpan delay, System.Action action, ICancelable cancelable ) : void |