Suspending function can block caller, but it can also suspend caller without blocking. Here I’m talking about a convention is that we agree not to write suspending functions that block, but only use their ability to suspend. Note, that the term “blocking” is defined differently in various languages and systems (for example, what we call “suspending” in Kotlin is called “blocking” in Go), so this maybe a source of confusion.

Written by

Project Lead for the Kotlin Programming Language @JetBrains

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store