One of the main features of Hopac - selective synchronization using "alternatives". In this snippet we download three web pages in parallel and the one that finishes first "wins" (or the timeout alternative becomes available for picking). What's nice in this solution is that the other two downloading jobs are cancelled immediately when the winner/timeout is available (i.e. an implicitly provided to the Asyncs CancellationTokens are cancelled). Alts is highly composable and, for example, the whole Alt.choose [ ... ] thing could be nested in another Alt.choose or combined with <|> or <&> operators with another Alt and so on.
3 people like thisPosted: 10 years ago by Vasily Kirichenko
https://github.com/tpetricek/FSharp.Joinads/blob/master/src/Joins/Samples.fs#L60 ported to Hopac.
1 people like thisPosted: 9 years ago by Vasily Kirichenko
We sometimes come across business processes where it's important to respond within a particular time window. Here's an experiment modelling that with Hopac
2 people like thisPosted: 9 years ago by mavnn
Joinads example from here https://github.com/tpetricek/FSharp.Joinads/blob/master/README.markdown translated to Hopac. No language extension needed, the code is equally compact and arguably more readable.
2 people like thisPosted: 9 years ago by Vasily Kirichenko
This is "Parallel tree processing" example from http://tryjoinads.org/ ported straitforwardly to Hopac.
3 people like thisPosted: 9 years ago by Vasily Kirichenko