Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DelayPromise()

System.Threading.Tasks.Task< TResult >.DelayPromise.DelayPromise ( uint millisecondsDelay)
inlinepackage

Definition at line 594 of file Task.cs.

595 {
596 if (TplEventSource.Log.IsEnabled())
597 {
598 TplEventSource.Log.TraceOperationBegin(base.Id, "Task.Delay", 0L);
599 }
601 {
602 AddToActiveTasks(this);
603 }
604 if (millisecondsDelay != uint.MaxValue)
605 {
606 _timer = new TimerQueueTimer(s_timerCallback, this, millisecondsDelay, uint.MaxValue, flowExecutionContext: false);
607 if (base.IsCompleted)
608 {
609 _timer.Close();
610 }
611 }
612 }
readonly TimerQueueTimer _timer
Definition Task.cs:592
static readonly TimerCallback s_timerCallback
Definition Task.cs:590
static bool s_asyncDebuggingEnabled
Definition Task.cs:960
static bool AddToActiveTasks(Task task)
Definition Task.cs:1186

References System.Threading.Tasks.Task< TResult >.DelayPromise._timer, System.Threading.Tasks.Task< TResult >.AddToActiveTasks(), System.Threading.TimerQueueTimer.Close(), System.L, System.Threading.Tasks.TplEventSource.Log, System.millisecondsDelay, System.Threading.Tasks.Task< TResult >.s_asyncDebuggingEnabled, and System.Threading.Tasks.Task< TResult >.DelayPromise.s_timerCallback.

Referenced by System.Threading.Tasks.Task< TResult >.DelayPromise.TimerCallback().