Part of the book series:Lecture Notes in Computer Science ((LNPSE,volume 6539))
Included in the following conference series:
951Accesses
37Citations
Abstract
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#.
This is a preview of subscription content,log in via an institution to check access.
Access this chapter
Subscribe and save
- Starting from 10 chapters or articles per month
- Access and download chapters and articles from more than 300k books and 2,500 journals
- Cancel anytime
Buy Now
- Chapter
- JPY 3498
- Price includes VAT (Japan)
- eBook
- JPY 5719
- Price includes VAT (Japan)
- Softcover Book
- JPY 7149
- Price includes VAT (Japan)
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, books and news in related subjects, suggested using machine learning.References
Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)
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)
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)
Berry, G., Gonthier, G.: The ESTEREL synchronous programming language: design, semantics, implementation. Sci. Comput. Program. 19(2), 87–152 (1992)
Friedman, D.P., Wise, D.S.: Aspects of applicative programming for parallel processing. IEEE Trans. Computers 27(4), 289–296 (1978)
Haller, P., Odersky, M.: Scala actors: Unifying thread-based and event-based programming. Theor. Comput. Sci. 410(2-3), 202–220 (2009)
Kiselyov, O.: Delimited control in OCaml, abstractly and concretely. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) FLOPS 2010. LNCS, vol. 6009, pp. 304–320. Springer, Heidelberg (2010)
Lauer, H.C., Needham, R.M.: On the duality of operating system structures. SIGOPS Oper. Syst. Rev. 13(2), 3–19 (1979)
Li, P., Zdancewic, S.: Combining events and threads for scalable network services implementation. SIGPLAN Not. 42(6), 189–199 (2007)
McNamara, B.: F# async on the server side (March 2010),http://tinyurl.com/fsasyncserver (retrieved 5/9/2010)
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)
Odersky, M., Spoon, L., Venners, B.: Programming in Scala, Artima, USA (2008)
Petricek, T., Skeet, J.: Real World Functional Programming: With Examples in F# and C#. Manning, USA (2009)
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)
Srinivasan, S.: Kilim: A Server Framework with Lightweight Actors, Isolation Types & Zero-copy Messaging. Ph.D. thesis, University of Cambridge (2010)
Srinivasan, S., Mycroft, A.: Kilim: Isolation-typed actors for java. In: Ryan, M. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 104–128. Springer, Heidelberg (2008)
Syme, D.: F# 2.0 Language Specification,http://tinyurl.com/fsspec
Syme, D.: Simplicity and compositionality in asynchronous programming through first class events (March 2006),http://tinyurl.com/composingevents, (retrieved: January 2010)
Syme, D., Granicz, A., Cisternino, A.: Expert F#. Apress (2007)
Virding, R., et al.: Concurrent programming in ERLANG, 2nd edn. Prentice Hall, Englewood Cliffs (1996)
Vouillon, J.: OCaml light weight threading library (2002),http://ocsigen.org/lwt/
Wehrman, I., Kitchin, D., Cook, W.R., Misra, J.: A timed semantics of Orc. Theor. Comput. Sci. 402, 234–248 (2008)
Author information
Authors and Affiliations
Microsoft Research, Cambridge, United Kingdom
Don Syme
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic
Tomas Petricek
Microsoft Corporation, Redmond, WA, USA
Dmitry Lomov
- Don Syme
Search author on:PubMed Google Scholar
- Tomas Petricek
Search author on:PubMed Google Scholar
- Dmitry Lomov
Search author on:PubMed Google Scholar
Editor information
Editors and Affiliations
CRACS & INESC-Porto LA, Faculty of Science, University of Porto, Rua do Campo Alegre, 1021, 4169-007, Porto, Portugal
Ricardo Rocha
Galois, 421 SW 6th Ave. Suite 300, 97204, Portland, OR, USA
John Launchbury
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Syme, D., Petricek, T., Lomov, D. (2011). The F# Asynchronous Programming Model. In: Rocha, R., Launchbury, J. (eds) Practical Aspects of Declarative Languages. PADL 2011. Lecture Notes in Computer Science, vol 6539. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-18378-2_15
Download citation
Publisher Name:Springer, Berlin, Heidelberg
Print ISBN:978-3-642-18377-5
Online ISBN:978-3-642-18378-2
eBook Packages:Computer ScienceComputer Science (R0)
Share this paper
Anyone you share the following link with will be able to read this content:
Sorry, a shareable link is not currently available for this article.
Provided by the Springer Nature SharedIt content-sharing initiative
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.