Is there a Task based replacement for System.Threading.Timer?

前端 未结 7 990
日久生厌
日久生厌 2020-11-27 09:49

I\'m new to .Net 4.0\'s Tasks and I wasn\'t able to find what I thought would be a Task based replacement or implementation of a Timer, e.g. a periodic Task. Is there such a

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 10:15

    It's not exactly in System.Threading.Tasks, but Observable.Timer (or simpler Observable.Interval) from Reactive Extensions library is probably what you're looking for.

提交回复
热议问题