Haskell (2012)
There is an async package for Haskell (2012) by Simon Marlow.
In case you don't know, Simon Marlow is a lead developer of Haskell.
Notes:
C# (2011)
Accoding to an Anders Hejlsberg interview for Channel 9 about Asynchronous Programming async/await
in C# takes inspiration on async worflows in F#.
Microsoft released a version of C# with async/await
for the first time in the Async CTP (2011). And were later officially released in C# 5 (2012).
In case you don't know, Anders Hejlsberg is the lead architect of C#, and has also worked in other languages including TypeScript.
F# (2007)
According to Don Syme, on his blog (2007), F# async workflows take inspiration from the implementation of asynchronous monad for haskell. In particular Peng Li's paper (2007) and Koen Claessen's "A Poor Man's Concurrency Monad" paper (1999).
The first version of F# to include "asynchronous workflows" is F# 1.9.2.7 (2007).
In case you don't know, Don Syme is the lead architect of F#, among other things.
Haskell (1999)
Koen Claessen's paper is the older implementation of operations with a result and continuations I can find (which is the logic behind async/await
), dating to 1999. It implements concurrency by defining atomic operations, continuations and a round-robin scheduler. The monaid approach would be the motivation for the switch from message passing to awaiting results.
Abstract form the paper:
Without adding any primitives to the language, we define a concurrency monad transformer in Haskell. This allows us to add a limited form of concurrency to any existing monad. The atomic actions of the new monad are lifted actions of the underlying monad. Some extra operations, such as fork , to initiate new processes, are provided. We discuss the implementation, and use some examples to illustrate the usefulness of this construction.
This was not part of an official release of the language.
Prior work: Haskell
Concurrent Haskell (1996) is an extension of Haskell, to which "A Poor Man's Concurrency Monad" is an alternative. Concurrent Haskell used software transactional memory and threads (fork).
And the paper "Implicit and Explicit Parallel Programming in Haskell" (1993) by Mark P. Jones and Paul Hudak. This paper laid the groundwork for Koen Claessen's paper. The paper defines a fork
function among other things.
Prior work: ML
In the paper "Implicit and Explicit Parallel Programming in Haskell" Mark and Paul analyze the properties of a fork
function and the problem of side effects in concurrency, among other things. They reference the paper "A semantics for ML concurrency primitives" (1992) which picks a set concurrent primitives based on Concurrent ML and provides a proof that they preserve sequential execution properties.