Skip to content
Update Kotlin coroutines authored by umaumax's avatar umaumax
...@@ -97,6 +97,11 @@ async function's result is 42 ...@@ -97,6 +97,11 @@ async function's result is 42
### await ### await
`.await()`を実行すると、その結果が返却されるまでこのコードの次の処理はブロックされる `.await()`を実行すると、その結果が返却されるまでこのコードの次の処理はブロックされる
## Mutex
[Mutex]( https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/ )
`Mutex.lock()`はsuspend関数であるので、スレッドをブロックしない
## Dispatchers ## Dispatchers
4種類のディスパッチャーがある 4種類のディスパッチャーがある
... ...
......