The F# asynchronous programming model

  • Authors:
  • Don Syme;Tomas Petricek;Dmitry Lomov

  • Affiliations:
  • Microsoft Research, Cambridge, United Kingdom;Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic;Microsoft Corporation, Redmond, WA

  • Venue:
  • PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

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#.