Colorless async/await in Firefly
Joakim Ahnfelt-Rønne
Posted on February 16, 2022
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(
{system.files.readText(file1)},
{system.files.readText(file2)}
)
pair.first + pair.second
}
Continue reading: https://www.ahnfelt.net/async-await-inference-in-firefly-part-2/
💖 💪 🙅 🚩
Joakim Ahnfelt-Rønne
Posted on February 16, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.