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

The First Step of Swift Concurrency

The First Step of Swift Concurrency

The summary of Swift Concurrency

[email protected]

June 23, 2021
Tweet

Other Decks in Programming

Transcript

  1. 4XJGU$PODVSSFODZ w ඇಉظॲཧ΍ಉ࣌ฒߦॲཧΛߏ଄Խͨ͠ํ๏Ͱॻͨ͘ΊʹݴޠͰαϙʔτ͢ Δػೳ w 4XJGU͔Β࢖༻Մೳ ˞J04 ɺNBD04 ɺUW04 ɺ

    XBUDI04 ͕ඞཁ  w ·ͩϨϏϡʔதͷ΋ͷ΋͋ΔͨΊมΘΔՄೳੑ͋Γ ࠓճ͸9DPEF#FUB࣌఺ ͷ৘ใʹج͍ͮͨ಺༰ʹͳ͍ͬͯ·͢ 
 ˞6OTUSVDUVSFE%FUBDIFEUBTLͷ৽͍͠γϯλοΫε͸XBUDI04ͷΈͰ༗ޮͰɺࠓޙJ04 ͳͲʹ΋൓ө͞ΕΔͱ૝ఆ͞Ε·͢ BQQMFͷSFMBTFͷϒϥϯνͰ͸طʹมߋࡁ
  2. 4USVDUVSFEDPODVSSFODZ ࢖͍෼͚ Ͳ͔͜Βݺͼग़ͤΔʁ ੜଘظؒ Ωϟϯηϧ ݩͷίϯςΩετ͔Β ܧঝ͢Δ΋ͷ BTZODMFUUBTLT BTZODؔ਺ એݴͷείʔϓ಺

    ࣗಈ QSJPSJUZ UBTLMPDBMWBMVF (SPVQUBTLT XJUI 5ISPXJOH 5BTL(SPVQ UBTLHSPVQͷ είʔϓ಺ ࣗಈ QSJPSJUZ UBTLMPDBMWBMVF 6OTUSVDUVSFEUBTLT Ͳ͔͜ΒͰ΋ είʔϓͳ͠ 5BTLܦ༝ QSJPSJUZ UBTLMPDBMWBMVF BDUPS %FUBDIFEUBTLT Ͳ͔͜ΒͰ΋ είʔϓͳ͠ 5BTLܦ༝ Կ΋
  3. "DUPST w ϓϩάϥϜ಺Ͱڞ༗͞ΕΔՄมঢ়ଶ TIBSFENVUBCMFTUBUF Λಉظ͢Δ࢓૊ΈΛ ఏڙͯ͠σʔλڝ߹Λ๷͙ػೳ ܕ  w ϓϩάϥϜͷଞͷ෦෼͔Β಺෦ͷঢ়ଶΛJTPMBUF

    ִ཭ ͢Δ w "DUPSͷঢ়ଶʹ͸"DUPSΛ௨͔ͯ͠͠ΞΫηεͰ͖ͣɺΞΫηεͰ͖Δͷ͸Ұ౓ʹ Ұͭͷ5IFBE͚ͩ w TUSVDUɺFOVNɺDMBTTʹ͍ۙػೳΛ͍࣋ͬͯΔࢀরܕ w ίʔυΛݟ͚ͨͩͰσʔλ͕कΒΕ͍ͯΔ͔͕Θ͔Δ MPDBMSFBTPOJOH  w ܕ͕$PODVSSFODZͷڥքͱͳΔͷͰΞϓϦ಺ͷߏ଄͕ΑΓ໌֬ʹ σʔλڝ߹ͭͷεϨου͕ಉ͡σʔλʹಉ࣌ʹΞΫηε͢Δ͜ͱ 
 ͨͩ͠ɺͦͷ಺ͷগͳ͘ͱ΋Ұ͕ͭॻ͖ࠐΈͰ͋Δ͜ͱ
  4. ࢀߟࢿྉ w 4XJGU$PODVSSFODZղઆηογϣϯ 
 .FFUBTZODBXBJUJO4XJGU 
 &YQMPSFTUSVDUVSFEDPODVSSFODZJO4XJGU 
 1SPUFDUNVUBCMFTUBUFXJUI4XJGUBDUPST 


    4XJGUDPODVSSFODZ#FIJOEUIFTDFOFT w ҰॹʹαϯϓϧΛϦϑΝΫλϦϯά͠ͳ͕Βֶ΂Δηογϣϯ 
 4XJGUDPODVSSFODZ6QEBUFBTBNQMFBQQ w ͦͷଞ 
 l4USVDUVSFEDPODVSSFODZzXJUITQFDJBMHVFTU%PVH(SFHPS 
 4XJGU'PSVNT
  5. "DUPSJTPMBUJPO 4FOEBCMFϓϩτίϧ w $PODVSSFODZͰ҆શʹڞ༗Ͱ͖ΔܕΛࣔ͢ϓϩτίϧ w 4FOEBCMFͳܕ 
 7BMVF5ZQF 
 "DUPS

    
 ϝϯόશͯJNNVUBCMFͳΫϥε 
 ಺෦Ͱಉظ͕Ͱ͖ΔΫϥε 
 ˏ4FOEBCMFؔ਺ܕ w ४ڌ͢Δͱ4XJGUίϯύΠϥ͕4FOEBCMF͔Ͳ͏͔ΛνΣοΫ͢Δ w δΣωϦοΫͳܕͷ৔߹ɺδΣωϦοΫҾ਺͕4FOEBCMFͳΒ͹4FOEBCMFʹͳ Δ $POEJUJPOBM$POGPSNBODF