The F# Asynchronous Programming Model
We describe the asynchronous programming model in F#, and its applications to reactive, parallel and concurrent programming. The key feature combines a core language with a non-blocking modality to author lightweight asynchronous tasks, where the modality has control flow constructs that are syntactically a superset of the core language and are given an asynchronous semantic interpretation. This allows smooth transitions between synchronous and asynchronous code and eliminates callback-style treatments of inversion of control, without disturbing the foundation of CPU-intensive programming that allows F# to interoperate smoothly and compile efficiently. An adapted version of this approach has recently been announced for a future version of C#.
Unable to display preview. Download preview PDF.
- 1.Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)Google Scholar
- 2.Baumann, A.: et al.: The multikernel: a new OS architecture for scalable multicore systems. In: SOSP 2009: Proc. of the ACM SIGOPS 22nd Symp. on OS Principles (2009)Google Scholar
- 3.von Behren, R., Condit, J., Brewer, E.: Why events are a bad idea (for high-concurrency servers). In: HOTOS 2003: Proc. of the 9th Conf. on Hot Topics in OS (2003)Google Scholar
- 10.McNamara, B.: F# async on the server side (March 2010), http://tinyurl.com/fsasyncserver (retrieved 5/9/2010)
- 11.Meijer, E., Beckman, B., Bierman, G.: LINQ: reconciling object, relations and XML in the.NET framework. In: SIGMOD 2006: Int. ACM Conf. on Mgmt. of Data. ACM, New York (2006)Google Scholar
- 12.Odersky, M., Spoon, L., Venners, B.: Programming in Scala, Artima, USA (2008)Google Scholar
- 13.Petricek, T., Skeet, J.: Real World Functional Programming: With Examples in F# and C#. Manning, USA (2009)Google Scholar
- 14.Rompf, T., Maier, I., Odersky, M.: Implementing first-class polymorphic delimited continuations by a type-directed selective CPS-transform. In: ICFP 2009: Proc. of the 14th ACM SIGPLAN Int. Conf. on Func. Prog. (2009)Google Scholar
- 15.Srinivasan, S.: Kilim: A Server Framework with Lightweight Actors, Isolation Types & Zero-copy Messaging. Ph.D. thesis, University of Cambridge (2010) Google Scholar
- 17.Syme, D.: F# 2.0 Language Specification, http://tinyurl.com/fsspec
- 18.Syme, D.: Simplicity and compositionality in asynchronous programming through first class events (March 2006), http://tinyurl.com/composingevents, (retrieved: January 2010)
- 19.Syme, D., Granicz, A., Cisternino, A.: Expert F#. Apress (2007)Google Scholar
- 21.Vouillon, J.: OCaml light weight threading library (2002), http://ocsigen.org/lwt/