DEV Community

Cover image for Colorless async/await in Firefly
Joakim Ahnfelt-Rønne
Joakim Ahnfelt-Rønne

Posted on

Colorless async/await in Firefly

In the last post, we sketched out the high level rules of the async/await inference. This post will show how it works under the hood for a concrete example that reads two files concurrently, and then concatenates the result:

readTwo(system: System, file1: String, file2: String): String {
    let pair = system.tasks.concurrently(
    pair.first + pair.second
Enter fullscreen mode Exit fullscreen mode

Continue reading:

Top comments (0)