Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In this lesson, you learned:

  • How to return values from coroutines in a variety of ways.
  • How to connect a plain old callback-based API to a coroutine-based application.
  • How to use the Deferred interface to get the result of the asynchronous computation.
  • How to use the async coroutine builder to start a coroutine that returns a result.
  • Finally, how to use the await and awaitAll suspending functions to wait for the result of the coroutine to be available.

That’s all for this lesson. In the next one, you’ll learn how to handle errors in coroutines.

See forum comments
Download course materials from Github
Previous: Demo Next: Return Values