Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update Kotlin coroutines
authored
Sep 28, 2023
by
umaumax
Show whitespace changes
Inline
Side-by-side
Kotlin-coroutines.md
View page @
f3a3f789
...
@@ -421,10 +421,18 @@ e.g. `java -Dkotlinx.coroutines.debug -jar ./app/build/libs/app-jvm.jar`
...
@@ -421,10 +421,18 @@ e.g. `java -Dkotlinx.coroutines.debug -jar ./app/build/libs/app-jvm.jar`
e.g.
e.g.
```
kotlin
```
kotlin
import
kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.launch
// launch実行後すぐに次の行が実行されるパターン
GlobalScope
.
launch
{
GlobalScope
.
launch
{
..
.
..
.
}
}
// 即座にjoin待ちするパターン
var
hoge
:
Hoge
?
=
null
GlobalScope
.
launch
{
hoge
=
genHoge
()
}.
join
()
```
```
### Error: Main method must return a value of type void
### Error: Main method must return a value of type void
...
...
...
...