Scheduling a IEnumerable periodically with .NET reactive extensions

后端 未结 5 493
闹比i
闹比i 2021-01-24 05:21

Say for example I have an enumerable

dim e = Enumerable.Range(0, 1024)

I\'d like to be able to do

dim o = e.ToObservable(Timesp         


        
5条回答
  •  囚心锁ツ
    2021-01-24 05:34

    You could always do this very simple approach:

    dim e = Enumerable.Range(0, 1024)
    dim o = e.ToObservable().Do(Sub (x) Thread.Sleep(1000))
    

    When you subscribe to o the values take a second to be produced.

提交回复
热议问题