Group Group Group Group Group Group Group Group Group

Errata for Kotlin Coroutines by Tutorials 2nd Edition

Creating this topic to catch any typos and bugs in the 2nd Edition of Kotlin Coroutines by Tutorials.

Hi! The “BroadcastChannelOpenSubscriptionExample” example for chapter 12 doesn’t appear to produce the expected output. The output given in the book is:

Press a key to exit...
Consumer 2: Grapes
Consumer 1: Grapes
Consumer 2: Strawberry
Consumer 1: Strawberry

but the actual output I’m getting is just:

Press a key to exit...

Really enjoying the book so far though, thanks!

@nisrulz Can you please help with this when you get a chance? Thank you - much appreciated! :]

1 Like

Chapter 4, Page 78 under the heading “Handling the continuation”

This paragraph starts with, “In the last version of getUser(), you used suspendCoroutine() from the Coroutines API.”

This is not true. The last version simply had us mark a function with the ‘suspend’ keyword. The function at the time was called ‘getUserSuspend()’

This paragraph is probably confusing the information given on page 75 where a hypothetical solution is offered for migrating to coroutines with functions that belong to an API for which we do not have control over. It was for a fictional function fun readFile(path:String, onReady: (File) -> Unit)

The paragraph on page 78 gets confusing because it goes on to explain the intricacies of suspendCoroutine() which we have not actually put to practice yet.

@filbabic Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hey @chuck_taylor!

Thanks for pointing this out!

You’re right, it gets a bit confusing because there are different functions involved, and the hypothetical solution is there to paint a picture of what you can do with coroutines & suspend functions.

We have this under the radar, and will change it up to make it more sensible, in the next edition of the book! :]

Hey @filbabic! Finally finding time to work through this book :slight_smile:

Today was chapter one and I found two small typos:

  • “where each operation has its own ambda parameter.” ambda → lambda
  • “With this, you are passing an implementation of the interface to the function that is executing the long-running task.” At this point you haven’t shown this, but only the interface declaration.

I’m excited to read more!

1 Like

Hey @vgonda!

Thanks for taking the time to write this up! I’m super excited to get your feedback on the book. :]

If there’s anything you’d want us to fix/clean up, let me know and we’ll plan it for the next edition (which I think should be soon).

Thanks! I hope you love the book!

I’m still loving it!

Chapter 5 errata:

In WTGFH it mentions “Since this is the last chapter in the first section”, however there are 4 more chapters in the section.