Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Coroutines 1.6移行記録 / Tried to migrate Coroutines to 1.6

Coroutines 1.6移行記録 / Tried to migrate Coroutines to 1.6

E505897a79eede1a676f92740261e8f8?s=128

Masatoshi Kubode

February 22, 2022
Tweet

More Decks by Masatoshi Kubode

Other Decks in Programming

Transcript

  1. ©2022 Wantedly, Inc. Coroutines 1.6 Ҡߦه࿥ ϞόΠϧษڧձ Wantedly × νʔϜϥϘ

    2022/2/22 ٱอग़խढ़ Photo by Andrii Ganzevych on Unsplash
  2. ©2022 Wantedly, Inc. XXXXBOUFEMZDPNJELVCPEF

  3. ©2022 Wantedly, Inc.  $PSPVUJOFTͷมߋ఺  "OESPJEͰҠߦͨ͠  ,..ͰҠߦ͠Α͏ͱ͕ͨ͠Ͱ͖ͳ͔ͬͨ 

    ·ͱΊ ࿩͢͜ͱ
  4. ©2022 Wantedly, Inc. $PSPVUJOFTͷมߋ఺

  5. ©2022 Wantedly, Inc. w LPUMJOYDPSPVUJOFTUFTUSFXPSL w .VMUJQMBUGPSNରԠ w ৽͍͠"1*ͷ௥Ճͱݹ͍"1*ͷ%FQSFDBUJPO w

    ,PUMJO/BUJWFOFXNFNPSZNPEFMJTOPX TVQQPSUFE $PSPVUJOFTͷมߋ఺ https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.6.0
  6. ©2022 Wantedly, Inc. LPUMJOYDPSPVUJOFTUFTU

  7. ©2022 Wantedly, Inc. w $PSPVUJOFTΛςετ͠΍͘͢͢ΔϥΠϒϥϦ w %JTQBUDIFSTTFU.BJOSFTFU.BJO w 5FTU%JTQBUDIFS DPSPVUJOFTUFTU

  8. ©2022 Wantedly, Inc. %JTQBUDIFSTTFU.BJOSFTFU.BJO

  9. ©2022 Wantedly, Inc. %JTQBUDIFSTTFU.BJOSFTFU.BJO ϢχοτςετͰ͸ϞοΫ͕ඞཁʂ

  10. ©2022 Wantedly, Inc. %JTQBUDIFSTTFU.BJOSFTFU.BJO Dispatchers.MainΛஔ͖׵͑Δ

  11. ©2022 Wantedly, Inc. %JTQBUDIFSTTFU.BJOSFTFU.BJO Dispatchers.Main͕StandardTestDispatcherʹͳΔ

  12. ©2022 Wantedly, Inc. %JTQBUDIFSTTFU.BJOSFTFU.BJO σϑΥϧτʹ໭Δ

  13. ©2022 Wantedly, Inc. 5FTU%JTQBUDIFS

  14. ©2022 Wantedly, Inc. 5FTU%JTQBUDIFS ͦͷ··ͩͱςετͷ࣮ߦʹ1ඵ͔͔Δ

  15. ©2022 Wantedly, Inc. 5FTU%JTQBUDIFS ςετͷ࣮ߦ͸ଈऴΘΔ

  16. ©2022 Wantedly, Inc. "OESPJEͰͷҠߦ

  17. ©2022 Wantedly, Inc. جຊతʹҠߦΨΠυ௨Γ "OESPJEͰͷҠߦ https://github.com/Kotlin/kotlinx.coroutines/blob/1.6.0/kotlinx-coroutines-test/MIGRATION.md $PSPVUJOFT $PSPVUJOFT SVO#MPDLJOH5FTU SVO5FTU

    5FTU$PSPVUJOF%JTQBUDIFS 6ODPO fi OFE5FTU%JTQBUDIFS 4UBOEBSE5FTU%JTQBUDIFS
  18. ©2022 Wantedly, Inc. 5FTU%JTQBUDIFS

  19. ©2022 Wantedly, Inc. ,..ͰͷҠߦ

  20. ©2022 Wantedly, Inc. w ͭͷେ͖ͳ໰୊͕ى͖ͨ w ,UPSͱͷ૊Έ߹Θͤ w *MMFHBM4UBUF&YDFQUJPO%JTQBUDIFST.BJOJT VTFEDPODVSSFOUMZXJUITFUUJOHJU

    ,..ͰͷҠߦ
  21. ©2022 Wantedly, Inc. w ,PUMJO/BUJWF্Ͱ,UPSY $PSPVUJOFT Ͱ*OWBMJE.VUBCJMJUZ&YDFQUJPO͕ى͖Δ w ,UPSͷϦϦʔεΛ଴ͭඞཁ⏱ ,UPSͷ໰୊

    https://youtrack.jetbrains.com/issue/KTOR-3463
  22. ©2022 Wantedly, Inc. w .VMUJQMBUGPSNରԠͨ͜͠ͱͰ௥Ճ͞Εͨྫ֎ w %JTQBUDIFSTTFU.BJOSFTFU.BJOݺͼग़͠ͱ %JTQBUDIFST.BJO΁ͷΞΫηε͕ผεϨουͰ ಉ࣌ʹى͖Δͱൃੜ %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU

  23. ©2022 Wantedly, Inc. %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU

  24. ©2022 Wantedly, Inc. %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU ViewModelͷςετΛ͢Δ

  25. ©2022 Wantedly, Inc. %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU ςετͷBefore/AfterͰsetMain/resetMain

  26. ©2022 Wantedly, Inc. %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU Dispatchers.MainΛ࢖ͬͯΔ

  27. ©2022 Wantedly, Inc. %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU Dispatchers.Main = ςετεϨουͱผεϨου Ͱ࣮ߦ͞ΕΔ

  28. ©2022 Wantedly, Inc. %JTQBUDIFST.BJOJTVTFEDPODVSSFOUMZXJUITFUUJOHJU Dispatchers.MainͰ࣮ߦ͞ΕΔ ·Εʹྫ֎͕ى͖Δ

  29. ©2022 Wantedly, Inc. w ͢΂ͯͷίϧʔνϯ͕ফඅ͞ΕΔ͜ͱΛ֬ೝ͢Δ w ςετ͝ͱʹDBODFM͢Δ w 5FTU%JTQBUDIFSҎ֎࢖Θͳ͍ w

    ཁ%* ๷͙ʹ͸
  30. ©2022 Wantedly, Inc. ·ͱΊ

  31. ©2022 Wantedly, Inc. w ओʹDPSPVUJOFTUFTUͷมߋ఺ʹ͍ͭͯ৮Εͨ w جຊతʹ͸ΨΠυ௨Γ w ᠘͸͋Δ w

    ,UPSͷϦϦʔεΛ଴ͭඞཁ ·ͱΊ
  32. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2022 Wantedly, Inc. 🙇