WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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

Lines changed: 1 addition & 1 deletion
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)