From 958516202cf5595878d226748fcaf049640a000d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Kosmaty?= Date: Tue, 7 May 2024 11:14:40 +0200 Subject: [PATCH] [docs] Remove incorrect usage of `launch` function (#28634) --- docs/pages/modules/module-api.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/pages/modules/module-api.mdx b/docs/pages/modules/module-api.mdx index 49b466a2501d2..323df25cd2d1c 100644 --- a/docs/pages/modules/module-api.mdx +++ b/docs/pages/modules/module-api.mdx @@ -197,9 +197,10 @@ This scope's lifecycle is bound to the module's lifecycle - all unfinished suspe ```kotlin Kotlin AsyncFunction("suspendFunction") Coroutine { message: String -> - launch { - return@Coroutine message - } + // You can execute other suspendable functions here. + // For example, you can use `kotlinx.coroutines.delay` to delay resolving the underlying promise. + delay(5000) + return@Coroutine message } ```