async doSomething => await somethingElse()
public async Task<int> FindPageSize(Uri uri)
{
byte[] data = await new WebClient().DownloadDataTaskAsync(uri);
return data.Length;
}
begin sync
let {print} = import "std.io"
let foo = fn()
print("foo started")
let bar_frame = async bar()
print("in foo")
let bar_res = await bar_frame
print("foo finished")
return bar_res
let bar = fn()
print("bar started")
suspend
print("bar resumed")
suspend
print("bar finished")
return 1
print("main started")
let foo_frame = async foo()
print("in main")
let res = await foo_frame
print("main finished:", res)
Languages with Async Await include JavaScript, C#, Dart, Chapel, X10, bog
Languages without Async Await include Ruby, C3, Jule
View all concepts with or missing a hasAsyncAwait measurement
Read more about Async Await on the web: 1.