LeeCampbell / RxCookbook

Collection of recipes and snippets helping you create useful Rx code
280 stars 39 forks source link

Async support with FromAsync not ToObservable #6

Open LeeCampbell opened 11 years ago

LeeCampbell commented 11 years ago

As pointed out in this post:

http://stackoverflow.com/questions/18477018/rx-and-tasks-cancel-running-task-when-new-task-is-spawned/18493158#18493158

ToObservable does not really offer Cancellation support as there is no way to pass in a CancelationToken. Favor the Observable.FromAsync(Func<CancelationToken, Task>) method instead.