From 43dc6baf2998319e23ebb1ab57eb4c33940ceb3d Mon Sep 17 00:00:00 2001 From: Isai Alvarado Date: Mon, 9 Jan 2023 20:44:20 -0800 Subject: [PATCH] Fix example code GlobalScope should not be in loadContributorsConcurrent if you want the function to be cancellable by using the cancel button. --- docs/topics/coroutines-and-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/coroutines-and-channels.md b/docs/topics/coroutines-and-channels.md index ffc41e2c05..fb72911012 100644 --- a/docs/topics/coroutines-and-channels.md +++ b/docs/topics/coroutines-and-channels.md @@ -905,7 +905,7 @@ the parent coroutine. req: RequestData ): List = coroutineScope { // ... - GlobalScope.async { + async { log("starting loading for ${repo.name}") delay(3000) // load repo contributors