1. acidhax's Avatar
    So I just picked up the Async CTP framework for .NET/CF, and I'm amazed at how easy it has made Asynchronous development.

    I EASILY fixed a slow load time by moving every data load/sort to an asynchronous thread.

    If you haven't, you should check it out!

    [CODE]
    private async void GonnaDoThis()
    {
    Boolean isItDoneYet = await ThisIsMyBackgroundThread();
    }

    private Task<Boolean> ThisIsMyBackgroundThread()
    {
    return TaskEx.Run(() => {
    Console.WriteLine("This was run in the background");
    return true;
    });
    }
    [/CODE]

    Easy as that. So cool.
    12-30-2011 01:13 PM
  2. RogueCode's Avatar
    Wow, looks pretty cool! I haven't actually played with this release but will at some point. Until then I'm using good old BackgroundWorkers
    12-31-2011 10:08 AM
  3. kenstone's Avatar
    So I just picked up the Async CTP framework for .NET/CF, and I'm amazed at how easy it has made Asynchronous development.

    I EASILY fixed a slow load time by moving every data load/sort to an asynchronous thread.

    If you haven't, you should check it out!

    [CODE]
    private async void GonnaDoThis()
    {
    Boolean isItDoneYet = await ThisIsMyBackgroundThread();
    }

    private Task<Boolean> ThisIsMyBackgroundThread()
    {
    return TaskEx.Run(() => {
    Console.WriteLine("This was run in the background");
    return true;
    });
    }
    [/CODE]

    Easy as that. So cool.
    Yeah. I'm looking forward to it. Most of my day job is ASP.NET MVC, so I'm not sure I'll get much use out of it there. But whenever it makes its way to Windows Phone and whatever we'll have for Windows 8 apps, I'm sure I'll be taking advantage often.
    12-31-2011 10:26 AM
  4. acidhax's Avatar
    It IS for Windows Phone :)
    12-31-2011 06:47 PM
  5. kenstone's Avatar
    It IS for Windows Phone :)
    Well, I meant production-worthy. It's still CTP, so it's not going to make into much of my code. Beta, maybe.
    01-05-2012 12:38 PM
LINK TO POST COPIED TO CLIPBOARD