I suggest you ...

More async-workflow features

Right now there is a big lack in the async-workflow if you compare it with C#/VB.nets implementation: you just cannot wait one-of-many results and there is no good timeout-support. You allways have to switch back into the Task-world.
Tomas Petricek had some great-ideas (see here: http://tomasp.net/blog/fsharp-variations-joinads.aspx) - I had hoped to see some of this in the new releases but alas no love for us poor pure functional lovers.

307 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Carsten KönigCarsten König shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    6 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Jack FoxJack Fox commented  ·   ·  Flag as inappropriate

        As Kirill Katsnelson points out, joinads is not strictly an async workflow feature, but a useful workflow extension for composable functional programming.

      • Kirill KatsnelsonKirill Katsnelson commented  ·   ·  Flag as inappropriate

        The feature that Tomas has created is not limited to asynchronous workflows. It is rather a generic monad builder extensions, consisting of the match! statement and a ? match pattern. Not only it allows for very expressive parallelism syntax, but also powerful in language parsing and agent programming monads. It extends F# idiom with new, powerful and clear expression, and I can't wait for it to be integrated into the mainstream F# compiler.

      • Carsten KönigCarsten König commented  ·   ·  Flag as inappropriate

        @Daniel Robinson: Cancellation-Support is not bad, but because the calls are tupled you cannot use |> operators, but this is a minor problem.
        The bigger problem is with Timeout - for example: yes there is a timeout for StartAsChild but this will only matter *after* the child-workflow finishes - so if you want a timeout of 5s but the computation takes 20s you get a timeout after 20(!)s ... well

      • Tomas PetricekTomas Petricek commented  ·   ·  Flag as inappropriate

        For those who are interested in this idea, a research version of F# with "joinads" can be now tried in the web browser (using Silverlight-based F# console). The examples include asynchronous workflows, but also other computations (agents, tasks, etc.) Visit: http://tryjoinads.org

      • Daniel RobinsonDaniel Robinson commented  ·   ·  Flag as inappropriate

        I don't understand this suggestion. Timeout/cancellation support is actually really good, which, by the way, facilitates awaiting "one of many results"--i.e., the first task to complete, if given the cancellation token, can cancel the other computations. For example: http://stackoverflow.com/a/6804733/162396

      • Ryan RileyRyan Riley commented  ·   ·  Flag as inappropriate

        This is strictly related to the computation expression syntax, right? Or do you refer to the Async<_> type itself? I ask because I think a lot of these features could probably be added today, though not supported in the computation expression syntax.

      Feedback and Knowledge Base