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

Hello, Swift Concurrency world.

Hello, Swift Concurrency world.

iOSDC Japan 2021 Talk about Swift Concurrency

[email protected]

September 19, 2021
Tweet

Other Decks in Programming

Transcript

  1. $PODVSSFOU 2VFVF εϨου εϨου εϨου εϨου ڞ༗εϨουϓʔϧ εϨου ॲཧ ॲཧ

    $PODVSSFOU2VFVF͸ෳ਺ͷεϨουΛੜ੒͢Δ ॲཧ ॲཧ εϨου ॲཧ εϨου ॲཧ
  2. $PODVSSFOU 2VFVF ڞ༗εϨουϓʔϧ $PODVSSFOU2VFVF͸ෳ਺ͷεϨουΛੜ੒͢Δ ॲཧ εϨου ॲཧ εϨου ॲཧ εϨου

    ॲཧ εϨου ॲཧ εϨου ॲཧ εϨου ॲཧ /FXεϨου /FXεϨου /FXεϨου /FXεϨου /FXεϨου
  3. εϨου εϨου εϨου ϝϞϦΦʔόʔϔου ϒϩοΫ͞ΕͨεϨου εϨου 📋 📋 📋 📋

    ϝϞϦΛ࿘අ͢Δ 4FSJBM2VFVFTZOD 4FSJBM2VFVFTZOD εϨου 📋 εϨου 📋 εϨου 📋 εϨου 📋
  4. εϨου εϨου εϨου εϨου εϨου εϨου εϨου εϨου εϨου εϨου͕ੜ੒͞ΕΔͨͼʹεϨουΛ੾Γସ͑Δ

    ա৒ʹൃੜˠଞͷॲཧͷ࣮ߦΛ஗Ԇͤ͞ΔՄೳੑ͋Γ εέδϡʔϦϯάΦʔόʔϔου
  5. εϨου εϨου εϨου εϨου ڠௐεϨουϓʔϧ $16 ࿦ཧ ίΞ਺Ͱݻఆ ݻఆ௕ $16

    ࿦ཧ ίΞ਺෼ ͷεϨουΛ࣋ͭ ڠௐεϨουϓʔϧΛ࢖ͬͯεϨουΛ࠶ར༻ 4XJGU$PODVSSFODZ
  6. εϨου $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO εϨου $POUJOVBUJPO $POUJOVBUJPO

    $POUJOVBUJPO $POUJOVBUJPO ϒϩοΫ͞Εͨ$POUJOVBUJPO εϨουΑΓ΋ܰྔͳ$POUJOVBUJPOΛ࢖ͬͯॲཧΛߦ͏ εϨουΛϒϩοΫ͠ͳ͍ 4XJGU$PODVSSFODZ
  7. BTZODؔ਺ͷ৔߹ GFUDI5IVNCOBJM SFTVNFͯ͠࠶ͼεϨουΛ઎༗࢖༻͢Δ GFUDI5IVNCOBJM SFTVNF EBUB GPSSFRVFTU εϨου GFUDI5IVNCOBJM EBUB

    GPS SFRVFTU EBUB GPS SFRVFTU BXBJU EBUB GPSSFRVFTU ⚠ඞͣಉ͡εϨουͰSFTVNF͢Δͱ͸ݶΒͳ͍ TZTUFN
  8. BTZODؔ਺ͷ৔߹ GFUDI5IVNCOBJM GFUDI5IVNCOBJM SFTVNF EBUB GPSSFRVFTU εϨου GFUDI5IVNCOBJM EBUB GPS

    SFRVFTU EBUB GPS SFRVFTU BXBJU $POUJOVBUJPO $POUJOVBUJPO ؔ਺։͔࢝ΒTVTQFOEɺSFTVNF͔Β࣍ͷTVTQFOEɺSFTVNF͔Βؔ਺׬ྃ TZTUFN EBUB GPSSFRVFTU
  9. εϨου $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO $POUJOVBUJPO εϨου $POUJOVBUJPO $POUJOVBUJPO

    $POUJOVBUJPO $POUJOVBUJPO ϒϩοΫ͞Εͨ$POUJOVBUJPO εϨουΑΓ΋ܰྔͳ$POUJOVBUJPOΛ࢖ͬͯॲཧΛߦ͏ εϨουΛϒϩοΫ͠ͳ͍ 4XJGU$PODVSSFODZ
  10. NFUBEBUB 5BTLUSFF GFUDI0OF5IVNCOBJM EBUB NFUBEBUB 5BTLUSFF GFUDI0OF5IVNCOBJM EBUB NFUBEBUB 5BTLUSFF

    GFUDI0OF5IVNCOBJM EBUB NFUBEBUB 5BTLUSFF GFUDI0OF5IVNCOBJM EBUB ݺͼग़͠ଆ͸݁ՌΛड͚औΔ͚ͩ
  11. 5BTLEFUBDIFE QSJPSJUZPQFSBUJPO पғͷίϯςΩετ͔Βಠཱͨ͠5BTLΛੜ੒͢Δ पғͷίϯςΩετΛܧঝ͠ͳ͍ .BJO εϨου DPMMFDUJPO7JFX @XJMM%JTQMBZGPS*UFN"U ଞͷ εϨου

    5BTL ⚠.BJOεϨουͰ࣮ߦ͞ΕΔՄೳੑ΋͋Δ γεςϜ࣍ୈ IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOTXJGUUBTLEFUBDIFE
  12. "DUPSJTPMBUJPO "DUPSʹΑΔִ཭ w σϑΥϧτͰɺ"DUPSͷΠϯελϯεʹඥͮ͘એݴ͸ɺ "DUPSJTPMBUFE "DUPSʹִ཭͞Εͨ ঢ়ଶ 
 ˞JNNVUBCMFΠϯελϯεϓϩύςΟ΍OPOJTPMBUFE ޙड़

    Λࢦఆͨ͠৔߹ ͸আ֎ OPOJTPMBUFE  w BTZODͰ͸ͳ͍"DUPSJTPMBUFEϝϯόʹ͸ɺͦͷ"DUPSͷΠϯ ελϯε TFMG ͔Β͔͠ɺಉظతʹΞΫηεͰ͖ͳ͍ w ͦΕҎ֎͔Β͸ɺBTZODܦ༝ͰΞΫηε͢Δ 
 ˞ಉ͡Ϟδϡʔϧ಺ͷɺJNNVUBCMFΠϯελϯεϓϩύςΟ΁͸ɺ௚઀Ξ ΫηεͰ͖Δৄࡉ
  13. εϨου εϨου εϨου εϨου ڠௐεϨουϓʔϧ 4FSJBMFYFDVUPSͰॲཧΛ࣮ߦ؅ཧ "DUPS͸Ұ౓ʹҰͭͷॲཧͷΈߦ͏ "DUPS 
 4FSJBMFYFDVUPS

    4FSJBMFYFDVUPS "DUPS 
 4FSJBMFYFDVUPS 4FSJBMFYFDVUPS "DUPS 
 4FSJBMFYFDVUPS 4FSJBMFYFDVUPS
  14.  %BUBCBTF2VFVF    #  ༏ઌॱҐͷٯస 1SJPSJUZ*OWFSTJPO 6TFS*OJUJBUFE

    #BDLHSPVOE " 4FSJBM2VFVFͷ৔߹ɺ௥Ճ͞Εͨॱ൪ʹॲཧΛ࣮ߦ͢Δ ݫ֨ͳ'*'0 'JSTU*O 'JSTU0VU
  15.  %BUBCBTF2VFVF    #  6TFS*OJUJBUFE #BDLHSPVOE ༏ઌ౓ͷ௿͍શͯͷॲཧͷ༏ઌ౓Λ্͛ͯઌʹ࣮ߦ͢Δ

    લͷશॲཧͷ׬ྃΛ଴ͨͳ͚Ε͹ͳΒͳ͍ ༏ઌॱҐͷٯస 1SJPSJUZ*OWFSTJPO
  16. # %BUBCBTF"DUPS      6TFS*OJUJBUFE #BDLHSPVOE ༏ઌ౓ͷߴ͍5BTLΛઌʹ࣮ߦͰ͖Δ

    ⚠ྫ֎5BTLͷ࣮ߦதʹɺ༏ઌ౓ͷΑΓߴ͍5BTL͕௥Ճ͞Εͨ৔߹ Ұ࣌తʹɺ࣮ߦதͷ5BTLͷ༏ઌ౓͸ɺ௥Ճ͞Εͨ5BTLͱಉϨϕϧʹ্͕Δ ৄࡉ "DUPSͷ࠶༏ઌॱҐ͚ͮ
  17. 88%$ηογϣϯू w 4XJGU$PODVSSFODZղઆηογϣϯ 
 .FFUBTZODBXBJUJO4XJGU🌟Ұ൪࠷ॳʹݟΔͷʹ͓͢͢Ί 
 &YQMPSFTUSVDUVSFEDPODVSSFODZJO4XJGU 
 1SPUFDUNVUBCMFTUBUFXJUI4XJGUBDUPST w

    ΑΓ಺෦ͷ࢓૊ΈΛ஌Δηογϣϯ 
 4XJGUDPODVSSFODZ#FIJOEUIFTDFOFT w ҰॹʹαϯϓϧΛϦϑΝΫλϦϯά͠ͳ͕Βֶ΂Δηογϣϯ 
 4XJGUDPODVSSFODZ6QEBUFBTBNQMFBQQ🌟طଘίʔυ͔Βͷม׵ΛҰาҰาֶ΂Δ w ଞͷ'SBNFXPSLͱͷ࿈ܞํ๏Λ஌Δηογϣϯ 
 #SJOH$PSF%BUBDPODVSSFODZUP4XJGUBOE4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