「Suspend関数のはなし」を読んだ

suspend関数のはなしを読んだ。

Kotlinの、suspend関数がどのように実現されているのか、を色々と解説している書籍。細切れのブロックに分けていたり(捉え方として)、それを順に実行している、という話があった。そのため、suspend関数の存在は知りつつもその内部実装がどうなっているのかまで把握していなかったが私でも内容をかなり想像できた。

coroutineをある程度知っていることを前提に話が進みます。多少知っていると想像できるかと思いますが、全く知らない人は以下を読むなどして把握してから読むと良さそう。

https://codelabs.developers.google.com/codelabs/kotlin-coroutines/#0

https://kotlinlang.org/docs/reference/coroutines/coroutines-guide.html

[update]

Good to read https://karino2.github.io/kotlin-lesson/suspend_intro.html to understand the suspend function as a user

1 Comment

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.