Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Erik Meijer: Rx in 15 Minutes - Rx is Here!!!!!

13 minutes, 9 seconds


Right click “Save as…”

Reactive Extensions for .NET, Rx, is here!!!

Erik Mejier explains what Rx is and why it matters in 15 minutes or less!


Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • Rx and MEF are my two favourite new additions to the v4 BCL. Just awesome to see so much care, thought and love going into the platform.

  • Grant BoyleGrantB What the hell are we supposed to use man? Harsh language?

    Could you (would you) use RX for file or socket I/O?

    If so how would you compare it to IO Completion Ports?


  • As Rx is a library to orchestrate, not perform asynchronous operations, you would use the Async IO features from .NET and use Rx to react to the completion of the IO:

    standard async IO:

    var fs = new FileStream(@"d:\temp\test.txt", FileMode.Open,
      FileAccess.Read, FileShare.Read, 1, true); 
    var data = new byte[fs.Length]; 
    fs.BeginRead(data, 0, data.Length, (result) => 
      var bytesRead = fs.EndRead(result);
      Console.WriteLine("{0} bytes read.", bytesRead); 
    }, null); 


    with Rx:

    var fs = new FileStream(@"d:\temp\test.txt", FileMode.Open, FileAccess.Read, 
      FileShare.Read, 1, true); 
    var data = new byte[fs.Length];
    var asyncRead = Observable.FromAsyncPattern<byte[], int, int, int>(
      fs.BeginRead, iasyncResult => fs.EndRead(iasyncResult)); 
    var result = asyncRead(data, 0, data.Length); 
    result.Subscribe(bytesRead => Console.WriteLine("{0} bytes read.", bytesRead)); 


    Now this is a small  sample, but the main difference is that in the latter, the result of the async operation is a first-class value. This means that you can pass the event stream around, do various operations on it (such as select, merge, selectmany, zip etc...), post the result to the UI thread, etc...


  • Allan LindqvistaL_ Kinect ftw

    in a bit of shameless self promotion, check out my project


    its a code generator that generate observable versions of various other things such as events Smiley

    the generation doesnt quite work yet because i needed a release like this to make it work, but check back soon Smiley

  • Allan LindqvistaL_ Kinect ftw

    a question, Rx is available for .net3.5 but it uses pfx, how does that work? is there a version of pfx included in the .net 3.5 release?



    yes it is Smiley



    http://geny.codeplex.com/ has now  been updated to wor with the new Rx release! there is still no release and im planning to backport it to vs2008 [might be trivial though] but the trunk is now able to create extension methods that return observable methods from events Smiley

  • Awsome. I'm definatly going to check it out =)

  • Hey folks,

    Where can we find the Rx dev labs? I've looked around (e.g. http://msdn.microsoft.com/en-us/aa570323.aspx) but can't find them anywhere!!



  • http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx

  • William Staceystaceyw Before C# there was darkness...

                var task1 = Task.Create(_ =>
                        "Thanks for back porting TPL to 3.5!".WriteLine();
                var task2 = Task.Create(_ => "Thanks for Rx Erik!".WriteLine());
                Task.WaitAll(task1, task2);
                "Thanks to all for these wonderful things!".WriteLine();


    BTW - what happened to Task.Factory?  I don't see factory class in these Rx 3.5 bits.  But the docs are full of factory samples?  What am I missing?

  • thanks J.

  • Allan LindqvistaL_ Kinect ftw

    are you sure they're not in there?

    they seem to bee in

    %programfiles%\Microsoft Reactive Extensions\Redist\DesktopV2\System.Threading.dll

    atleast, perhaps you have another version in the gac or something?

    The correct version should be 1.0.2052.0

  • Maddus MattusMaddus Mattus Maddus on C9, Is often ​controversi​al, But fun ​none-the-​less -​evildictait​or

    Very cool!

  • Allan LindqvistaL_ Kinect ftw

    for an approach to turn dependency properties into Observables, check out this thread Smiley


  • William Staceystaceyw Before C# there was darkness...

    "The correct version should be 1.0.2052.0"


    My version was 1.0.3058.34407 downloaded with the .Net 3.5 link.  No Future either.  I am guessing this backported version is slimmed down to just the bones they needed for Rx.

  • Allan LindqvistaL_ Kinect ftw

    ok.. mine is 1.0.2052.0 atleast Smiley downloaded the 3.5 version on this box no more than an hour ago

    maybe someone from the team can shed some light on this?


    (wasnt Future replaced by Taks<T> by the way? )

  • Sounds like you have the June 2008 CTP version of Pfx installed on your machine, their version number was 1.0.3058.34407. Try going through your installed program list to see if it is still there by anychance and uninstall that before installing Rx...

  • William Staceystaceyw Before C# there was darkness...

    "Sounds like you have the June 2008 CTP version of Pfx installed on your machine"


    You sir are steely eyed missle man.  That was the issue.  Explains a lot of other things have been knocking head on.

  • I like the concept of explaining in 15 min. To the point. Keep up the good work

  • Brilliant and Interestingly Explained.


    Thx for this Video !!!

  • Great video - my friend recommended Rx, and the penny dropped for the first time after watching this video.

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.