fCraft.Scheduler.NewBackgroundTask C# (CSharp) Method

NewBackgroundTask() public static method

Creates a new SchedulerTask object to run in the background thread. Use this if your task is not very time-sensitive or frequent, or if your callback is resource-intensive.
public static NewBackgroundTask ( [ callback ) : SchedulerTask
callback [ Method to call when the task is triggered.
return SchedulerTask
        public static SchedulerTask NewBackgroundTask( [NotNull] SchedulerCallback callback )
        {
            return new SchedulerTask( callback, true );
        }

Same methods

Scheduler::NewBackgroundTask ( [ callback, [ userState ) : SchedulerTask

Usage Example

Example #1
0
 /// <summary> Begins to asynchronously check player's account type. </summary>
 public void CheckAccountType()
 {
     if (AccountType != AccountType.Paid)
     {
         Scheduler.NewBackgroundTask(CheckPaidStatusCallback).RunOnce(this, TimeSpan.Zero);
     }
 }
All Usage Examples Of fCraft.Scheduler::NewBackgroundTask