Built in background-scheduling system in .NET?

后端 未结 6 769
南笙
南笙 2021-01-21 04:14

I ask though I doubt there is any such system.

Basically I need to schedule tasks to execute at some point in the future (usually no more than a few seconds or possibly

6条回答
  •  自闭症患者
    2021-01-21 04:51

    Well.....Actually you can do exactly what you asked....

      IDisposable kill = null;
    
      kill = Scheduler.TaskPool.Schedule(() => DoSomething(), dueTime);
    
      kill.Dispose();
    

    Using Rx the Reactive Framework from our buddies at Microsoft :)

    Rx is quite amazing. I've all but replaced events with it. It is just plain yummy...

    Hi I'm Rusty I'm an Rx addict...and I like it.

提交回复
热议问题