Skip to content

Commit 43dc6ba

Browse files
authored
Fix example code
GlobalScope should not be in loadContributorsConcurrent if you want the function to be cancellable by using the cancel button.
1 parent dea2ca5 commit 43dc6ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/topics/coroutines-and-channels.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ the parent coroutine.
905905
req: RequestData
906906
): List<User> = coroutineScope {
907907
// ...
908-
GlobalScope.async {
908+
async {
909909
log("starting loading for ${repo.name}")
910910
delay(3000)
911911
// load repo contributors

0 commit comments

Comments
 (0)