Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinthe Continuation interfaceSingle-choice MCQ

A suspendCoroutine block resumes its continuation TWICE (calls cont.resume(...) on two separate code paths). Given how the standard BaseContinuationImpl/SafeContinuation machinery works, what is the defined outcome?

suspend fun broken(): Int = suspendCoroutine { cont -> cont.resume(1) cont.resume(2) }