Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the Reactive Framework (Rx) relate to Tasks in .NET 4?

Asynchronous and concurrent programmings seams to be on everyones minds these days and .NET 4 adds a number of improvements such as built-in thread safe collections and of course tasks. On top of this I've started looking at the Reactive Framework (Rx).

Tasks appears to be primarily more focused on concurrency for computation performance although it's also a general model for operations that will complete some time in the future and can be used handle other types of asynchronous operations, as well as combining them using .Continue*(). The Rx appears to be more useful for reacting to multiple events and stateful event handling.

Do you see an overlap between these two frameworks and specifically, do you see a use for modelling am IObservable in terms of a Task and vice versa?

like image 853
SoftMemes Avatar asked Oct 16 '09 12:10

SoftMemes


2 Answers

Just saw a blog post from the PFX team linking to a Channel 9 video discussion PFX in relation to RX, that should answer some of the questions: Wes Dyer and Stephen Toub: Rx and Px - Working Together

like image 69
SoftMemes Avatar answered Sep 17 '22 11:09

SoftMemes


Eric Meijer states in this video that all the concurrency aspects of Rx are implemented using PFX

like image 42
Benjol Avatar answered Sep 20 '22 11:09

Benjol