Its closest relations are C#, Python, and Javascript’s async/await. They also allow your code to stay ordered the same way as blocking code, and integrate with existing callback and futures-based code.
The main difference with Kotlin coroutines, as far as I’m aware, is the presence of the await keyword, and the way you write the return type of the function. In C#, calling an async function gives you a future (Task<T>), which you then await to suspend and get its value:
async Task<int> AccessTheWebAsync()
{
HttpClient client = new HttpClient();
string page = await client.GetStringAsync("https://example.com");
return await FurtherProcessing(page);
}
While Kotlin coroutines are much more syntactically similar to sync code (using a fake API to match the C# example):
suspend fun accessTheWeb(): int {
val client = HttpClient()
val page = client.getString("https://example.com")
return furtherProcessing(page)
}