ronag
ronag

Reputation: 51253

How to wait for a IScheduler.Schedule?

What is the best way to wait for something scheduled on a IScheduler, i.e is there any elegant way to get a future or IObservable the schedule call?

scheduler.Schedule(() => Thread.Sleep(2000));
// wait for call to finish

Upvotes: 1

Views: 468

Answers (1)

ronag
ronag

Reputation: 51253

Solved it with Observable.Start().FirstOrDefault()

Upvotes: 1

Related Questions