What is async and await in Kotlin?

Here if you notice, we have used the async{} which returns an instance of Deferred<T> , which has an await() function that returns the result of the coroutine like we have future in Java in which we do future. get() to the get the result.

Leave a Reply

Your email address will not be published. Required fields are marked *