The async-await pattern is one of the more powerful additions to .NET 4.5 and C# 5.0
It is currently only available in C# and VB as far as I know.
Is this API a feature of the .NET CLR or of the C# compiler itself?
What I'm really asking is this - should we expect async/await in the other .NET languages such as:
Please note I'm not asking about asynchronous programming in general, but about the specifics of the async-await pattern (asynchronous code which is written synchronously).
Is this API a feature of the .NET CLR or of the C# compiler itself?
This is a feature of the compiler. There were no CLR changes required to support async
and await
. Other languages would need to be extended to support it. There is nothing preventing a compiler from doing this, but it would have to be changed in the compiler and language itself.
C++ does support some asynchrony in Windows Store applications via task
/then
, though it's not as usable as the async
/await
keywords in C# and VB.
It is currently only available in C# and VB as far as I know
Note that F# also has async
support (which predates the C# and VB.Net versions by quite a bit). It is different than the C# style async support, but similar (and inspired the C# and VB.Net teams).
The C# and VB.Net compilers implement the await
pattern by transforming the original method into a state machine. This is very similar to say how the F# async / work flow pattern works. This type of transformation is possible in any language that targets the CLR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With