Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hello, Swift Concurrency world.の振り返り / Looking ...
Search
[email protected]
September 24, 2021
Programming
0
130
Hello, Swift Concurrency world.の振り返り / Looking back on Hello, Swift Concurrency world.
This is the continuation of "Hello, SwiftConcurrency world." at iOSDC Japan 2021.
[email protected]
September 24, 2021
Tweet
Share
More Decks by
[email protected]
See All by
[email protected]
Swiftコンパイラ超入門+async関数の仕組み
shiz
0
170
複雑さに立ち向かうための ソフトウェア開発入門
shiz
3
1.3k
座談会 「Strict ConcurrencyとSwift 6が開く新時代: 私たちはどう生きるか?」
shiz
5
13k
(非公開スライド追加)座談会 「Strict ConcurrencyとSwift 6が開く新時代: 私たちはどう生きるか?」
shiz
1
420
複雑さに立ち向かうためのコードリーディング入門
shiz
35
13k
Swift Observation
shiz
5
790
Swift Reflection
shiz
1
190
Swift Concurrency Next Step
shiz
7
7.8k
そろそろSwift Concurrency
shiz
1
470
Other Decks in Programming
See All in Programming
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.3k
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
ドメインイベント増えすぎ問題
h0r15h0
2
560
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
140
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
240
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.7k
Androidアプリの One Experience リリース
nein37
0
1.2k
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.2k
Azure AI Foundryのご紹介
qt_luigi
1
190
ASP.NET Core の OpenAPIサポート
h455h1
0
110
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Documentation Writing (for coders)
carmenintech
67
4.5k
Designing for Performance
lara
604
68k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Statistics for Hackers
jakevdp
797
220k
Speed Design
sergeychernyshev
25
740
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
We Have a Design System, Now What?
morganepeng
51
7.3k
4 Signs Your Business is Dying
shpigford
182
22k
Automating Front-end Workflow
addyosmani
1366
200k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
GitHub's CSS Performance
jonrohan
1030
460k
Transcript
-PPLJOHCBDLBUJ04%$+BQBO TIJ[ )FMMP 4XJGU$PODVSSFODZXPSME ͷৼΓฦΓ Ћ
ΞδΣϯμ w4XJGU$PODVSSFODZͱߏԽϓϩάϥϛϯά wσʔλڝ߹ࢭͷஈ֊తಋೖ
4XJGU$PODVSSFODZͱߏԽϓϩάϥϛϯά
ߏԽϓϩάϥϛϯά IUUQTFXPSETKQXߏԽϓϩάϥϛϯάIUNM ίϯϐϡʔλϓϩάϥϜͷ։ൃཧղɺमਖ਼Λԁʹߦ͑Δ Α͏ɺϓϩάϥϜΛཧ͞ΕͨߏͷΈ߹ΘͤʹΑͬͯߏ ͢Δ͜ͱɻҰൠతʹ w ॱ هड़ͨ͠ॱ൪ʹ࣮ߦ͢Δ w
ذ ࢦఆ͞Εͨ݅Λຬ͔ͨ͢൱͔Ͱࢬ͔Ε͢Δ w ෮ ࢦఆ͞Ε͕ͨ݅Γཱͭؒ܁Γฦ͢ ͷࡾͭͷ੍ޚߏʹΑͬͯॲཧͷྲྀΕΛهड़͢Δ͜ͱͰ͋Δ ͱཧղ͞Ε͍ͯΔɻ
ؔΛൈ͚ͨޙ Ͳ͔͜ͷ࣌Ͱ࣮ߦ͞ΕΔ ݁ՌΛड͚औΔλΠϛϯά࣍ୈ ίʔϧόοΫܗࣜͷඇಉظॲཧ ίʔϧόοΫ࣮ߦલʹείʔϓΛൈ͚Δ
BTZODBXBJU ݁ՌΛͬͯ࣍ʹਐΉ ্͔ΒԼʹॲཧ͕࣮ߦ͞ΕΔ ͜ͷείʔϓͰશͯͷॲཧ͕݁͢Δ
GPSϧʔϓ "TZOD4FRVFODF IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOGPVOEBUJPOVSMMJOFT
NFUBEBUB 5BTLUSFF GFUDI0OF5IVNCOBJM EBUB NFUBEBUB 5BTLUSFF GFUDI0OF5IVNCOBJM EBUB NFUBEBUB 5BTLUSFF
GFUDI0OF5IVNCOBJM EBUB NFUBEBUB 5BTLUSFF GFUDI0OF5IVNCOBJM EBUB 4USVDUVSFE$PODVSSFODZ Γ<6**NBHF>
ߏԽϓϩάϥϛϯά IUUQTFXPSETKQXߏԽϓϩάϥϛϯάIUNM ίϯϐϡʔλϓϩάϥϜͷ։ൃཧղɺमਖ਼Λԁʹߦ͑Δ Α͏ɺϓϩάϥϜΛཧ͞ΕͨߏͷΈ߹ΘͤʹΑͬͯߏ ͢Δ͜ͱɻҰൠతʹ w ॱ هड़ͨ͠ॱ൪ʹ࣮ߦ͢Δ w
ذ ࢦఆ͞Εͨ݅Λຬ͔ͨ͢൱͔Ͱࢬ͔Ε͢Δ w ෮ ࢦఆ͞Ε͕ͨ݅Γཱͭؒ܁Γฦ͢ ͷࡾͭͷ੍ޚߏʹΑͬͯॲཧͷྲྀΕΛهड़͢Δ͜ͱͰ͋Δ ͱཧղ͞Ε͍ͯΔɻ
σʔλڝ߹ࢭͷஈ֊తಋೖ
σʔλڝ߹ͱʁ wσʔλڝ߹ͱɺϓϩάϥϜͰڞ༗͞ΕͨՄมঢ়ଶ TIBSFE NVUBCMFTUBUF ʹෳͷεϨου͔Βॻ͖ࠐΈΞΫηεΛؚ Μͩಉ࣌ΞΫηε͕ى͖ͨ݁ՌɺऔΓग़݁͢Ռ͕λΠϛϯά࣍ ୈͰมΘͬͯ͠·͏ݱ
"DUPS "DUPST w ϓϩάϥϜͰڞ༗͞ΕͨՄมঢ়ଶɺෳͷεϨου͔Β ͷಉ࣌ΞΫηεΛ͙ɺࢀরܕͷσʔλߏ w TUSVDUɺFOVNɺDMBTTʹ͍ۙػೳΛ͍࣋ͬͯΔ
4XJGU$PODVSSFODZ3PBENBQ
ஈ֊ͷ"DUPSʹΑΔσʔλڝ߹ࢭ wୈஈ֊ "DUPSΛར༻͍ͯ͠Δ෦Ͱσʔλڝ߹Λ͙ ྫάϩʔόϧมΛHMPCBMBDUPSʹ͢ΔɻDMBTTΛBDUPSʹม͢Δ wୈஈ֊ άϩʔόϧมHMPCBMBDUPSͰकΒͳ͚ΕͳΒͳ͍ ͘͠໌
ࣔతʹνΣοΫର֎ʹ͠ͳ͚ΕͳΒͳ͍ DMBTTDMBTTΛ෦ʹؚΜͩܕσϑΥϧτͰಉ࣌ฒߦॲཧؒͰ ༻Ͱ͖ͳ͘ͳΔ 4XJGU$PODVSSFODZ3PBENBQ ୈஈ֊ͰTPVSDFCSFBLJOHΛى͜͢Մೳੑ
͍ͭʁ wݴޠͷϞʔυ όʔδϣϯ ͰมΘΔ w4XJGUϢʔβ͕BTZODBXBJU"DUPSʹ׳ΕΔ·Ͱ࣌ؒΛ༩͑Δ 4XJGU$PODVSSFODZ3PBENBQ 4XJGUʜͷ
ஈ֊త4FOEBCMFνΣοΫ ·ͩ1JUDI IUUQTHJUIVCDPN%PVH(SFHPSTXJGUFWPMVUJPOCMPCTFOEBCMFTUBHJOHQSPQPTBMTOOOOTFOEBCMFTUBHJOHNE QJUDI͋Γ
4FOEBCMF w ಉ࣌ฒߦॲཧؒͰڞ༗ͯ҆͠શͳܕΛࣔ͢ϓϩτίϧ !VODIFDLFEΛ͚ΔͱνΣοΫΛআ֎Ͱ͖Δ wؔܕϓϩτίϧʹ४ڌͰ͖ͳ͍ͨΊ!4FOEBCMFͱ͍͏ଐ ੑΛ༻ w͜Εʹ४ڌ͠ͳ͍ͱίϯύΠϧΤϥʔʹͳΔ߹͕͋Δ 5BTLJOJU5BTLEFUBDIFEͷҾͷΫϩʔδϟͰ͏ܕͳ Ͳ
4FOEBCMFνΣοΫͷ w Ұؾʹ4FOEBCMFνΣοΫΛಋೖͯ͠͠·͏ͱɺ$PODVSSFODZ ʹରԠ͍ͯ͠ͳ͍Ϟδϡʔϧͷܕ͕͑ͳ͘ͳͬͯ͠·͍ɺ։ ൃ͕ਐ·ͳ͘ͳͬͯ͠·͏Մೳੑ ͜͜Ͱݴ͏ϞδϡʔϧͱɺࣗͷϓϩδΣΫτͷଞͷν ʔϜ͕։ൃ͍ͯ͠ΔϞδϡʔϧར༻͍ͯ͠ΔϥΠϒϥϦͷ ϞδϡʔϧΛࢦ͠·͢
4FOEBCMFνΣοΫͷ Ϟδϡʔϧ"͕$PODVSSFODZʹରԠ͠ͳ͍ͱܕ͕͑ͳ͍ Ϟδϡʔϧ" $PODVSSFODZରԠલ Ϟδϡʔϧ#
4FOEBCMFνΣοΫͷ !VODIFDLFEͰճආͰ͖Δ Ϟδϡʔϧ" Ϟδϡʔϧ#
4FOEBCMFνΣοΫͷ 4FOEBCMFνΣοΫ͠ͳ͍ͷͰσʔλڝ߹Λى͜͢ϦεΫ͕͋Δ ؾ͕͖ͭʹ͍͘ Ϟδϡʔϧ" Ϟδϡʔϧ#
طଘΫϥΠΞϯτͷӨڹ CPEZಉ࣌ฒߦʹ࣮ߦ͞ΕΔՄೳੑ͕͋ΔͨΊˏ4FOEBCMF͕ඞཁ CPEZͰੜ͞ΕΔΓͷܕ4FOEBCMF͕ඞཁ Ϟδϡʔϧ$ $PODVSSFODZରԠલ Ϟδϡʔϧ$ $PODVSSFODZରԠޙ
5͕4FOEBCMFʹ४ڌ͍ͯ͠ͳ͍ CPEZ͕!4FOEBCMFΫϩʔδϟʹมͰ͖ͳ͍ طଘΫϥΠΞϯτͷӨڹ Ϟδϡʔϧ% Ϟδϡʔϧ$ $PODVSSFODZରԠޙ
ஈ֊తͳ4FOEBCMFνΣοΫ w ঃʑʹ4FOEBCMFνΣοΫΛ͛Δ ڧΊΔΑ͏ʹ͢Δ w Ϟδϡʔϧ୯ҐͰνΣοΫͷ੍ޚΛͰ͖ΔΑ͏ʹ͢Δ
ஈ֊తͳ4FOEBCMFνΣοΫ w $PODVSSFODZະରԠϞδϡʔϧͷ4FOEBCMFͰͳ͍ܕͷν ΣοΫΛɺΤϥʔ͔ΒϫʔχϯάʹԼ͛Δɻ͘͠νΣο Ϋ͠ͳ͘͢Δ w Ϟδϡʔϧ୯ҐͰͷνΣοΫ੍ޚΛߦ͏ɻ$PODVSSFODZΛద ༻͍ͯ͠ΔϞδϡʔϧͱ͍ͯ͠ͳ͍ϞδϡʔϧͰνΣοΫͷํ ๏Λ۠ผ͢Δ
Ϟδϡʔϧ୯ҐνΣοΫ $PODVSSFODZରԠલ Ϟδϡʔϧ"ͷܕ4FOEBCMFͱਪ͞ΕɺϞδϡʔϧ#ͰΤϥʔʹͳΒͳ͍ ˞σʔλڝ߹͔Βݫ֨ʹ҆શͰͳ͍ Ϟδϡʔϧ" $PODVSSFODZରԠલ Ϟδϡʔϧ#
Ϟδϡʔϧ୯ҐͷνΣοΫ $PODVSSFODZରԠޙ 4FOEBCMFͳͷͰΤϥʔʹͳΒͳ͍ Ϟδϡʔϧ" $PODVSSFODZରԠޙ Ϟδϡʔϧ#
OPO4FOEBCMF OPO4FOEBCMFͳͷͰΤϥʔ Ϟδϡʔϧ" $PODVSSFODZରԠޙ Ϟδϡʔϧ# Ϟδϡʔϧ୯ҐͷνΣοΫ $PODVSSFODZରԠޙ
Ϟδϡʔϧ$PODVSSFODZΛద༻͢Δํ๏ w 4XJGU9ϞʔυͰίϯύΠϥϑϥά˞Λઃఆ͢Δ ˞ݱࡏͷ໊લXBSODPODVSSFODZ w 4XJGUϞʔυΛઃఆ͢Δ
5͕4FOEBCMFʹ४ڌ͍ͯ͠ͳ͍ CPEZ͕!4FOEBCMFΫϩʔδϟʹมͰ͖ͳ͍ طଘΫϥΠΞϯτͷӨڹ Ϟδϡʔϧ$ $PODVSSFODZରԠޙ Ϟδϡʔϧ%
5͕4FOEBCMFʹ४ڌ͍ͯ͠ͳ͍ 4XJGU9ͰϫʔχϯάʹͳΔ ˞ݱঢ়ϫʔχϯάग़ྗ͞Εͳ͍ͷͰࠓޙมΘΔՄೳੑ͋Γ طଘΫϥΠΞϯτͷӨڹ Ϟδϡʔϧ%
ίϯςΩετʹ߹Θͤͯ!4FOEBCMFʹOPO!4FOEBCMFʹͳΔ CPEZ͕!4FOEBCMFΫϩʔδϟʹมͰ͖ͳ͍ !VOTBGF4FOEBCMF˞ طଘΫϥΠΞϯτͷӨڹ Ϟδϡʔϧ$ $PODVSSFODZରԠޙ ˞໊শʹ͍ͭͯࠓޙมΘΔՄೳੑ͋Γ
!4FOEBCMFͰͳ͍ͷͰΤϥʔʹͳΒͳ͍ طଘΫϥΠΞϯτͷӨڹ Ϟδϡʔϧ% $PODVSSFODZରԠલ
ະରԠͰ$PODVSSFODZΛ༻͍ͯ͠Δ߹ !4FOEBCMFͱͯ͠ѻΘΕΔ طଘΫϥΠΞϯτͷରԠ Ϟδϡʔϧ% $PODVSSFODZରԠલ
͋ΔϞδϡʔϧͷ4FOEBCMFνΣοΫஈ֊ w 4XJGU9 $PODVSSFODZ༻෦ͷΈ4FOEBCMFνΣοΫΛͯ͠ϫʔχϯά͕ൃੜ͢Δ !VOTBGF4FOEBCMF$PODVSSFODZΛ༻͍ͯ͠Δ෦Ͱ!4FOEBCMFɺͦ ΕҎ֎OPO!4FOEBCMFͱͯ͠ѻΘΕΔ w 4XJGU9
ίϯύΠϥϑϥά ϞδϡʔϧશମͰ4FOEBCMFνΣοΫΛͯ͠ϫʔχϯά͕ൃੜ͢Δ !VOTBGF4FOEBCMFৗʹ!4FOEBCMFͱͯ͠ѻΘΕΔ w 4XJGU ϞδϡʔϧશମͰ4FOEBCMFνΣοΫΛͯ͠Τϥʔ͕ൃੜ͢Δ ͨͩ͠ɺ$PODVSSFODZະରԠͷϞδϡʔϧͷܕϫʔχϯά͕ൃੜ͢Δ
ஈ֊తʹಋೖ͢Δ͜ͱͰ w $PODVSSFODZະରԠͳͷ͕։ൃͷअຐΛ͠ͳ͍ w $PODVSSFODZରԠޙదʹνΣοΫΛͯ͘͠ΕΔ w ·ͣ4XJGU9ͰϫʔχϯάΛग़ྗ͢Δ͜ͱͰɺ4XJGUͰى͜ɹ ΔΤϥʔʹඋ͑Δ͜ͱ͕Ͱ͖Δ
ຊͷ·ͱΊ w 4XJGU$PODVSSFODZߏԽϓϩάϥϛϯά͕ҙࣝ͞Ε͍ͯΔ w σʔλڝ߹ͷνΣοΫʹΑͬͯTPVSDFCSFBLJOH͕ى͜ΔՄೳ ੑ͕ࣔࠦ͞Ε͍ͯΔ͕ɺݴޠͷόʔδϣϯϑϥάͷ༗ແʹΑ ͬͯঃʑʹରԠ͍͚ͯ͠ΔΑ͏ͳΈ͕४උ͞Ε͍ͯΔ ·ͩ 1JUDIஈ֊
w σʔλڝ߹Λى͜͢Մೳੑ͕͋ΔίʔυকདྷతʹΤϥʔʹͳ ΔՄೳੑ͕͋ΔͷͰɺࠓ͔ΒҙࣝΛ͢Δඞཁ͕͋Γͦ͏ άϩ ʔόϧมDMBTTΛ͍ͬͯΔՕॴͳͲ
͋Γ͕ͱ͏͍͟͝·ͨ͠
ஈ֊త4FOEBCMFνΣοΫ 1JUDI ه IUUQTHJTUHJUIVCDPNCFDDBEBYDDEFBCBFGDF
جຊతʹΓ͍ͨ͜ͱมΘΒͳ͍
TUSJDUDPODVSSFODZ w લճͷXBSODPODVSSFODZͱಉ͡ w 4XJGU9όʔδϣϯͰίϯύΠϥϑϥάʹࢦఆ͢Δͱɺ 4FOEBCMFνΣοΫΤϥʔͰͳ͘શͯܯࠂʹͳΔ
!QSFEJDBUF$PODVSSFODZ w ֎෦͔Βར༻͞ΕΔϥΠϒϥϦϞδϡʔϧͰ4XJGU $PODVSSFODZΛ༻͍ͨ͠߹ʹɺ4FOEBCMFະରԠͷϞδϡ ʔϧͰ༻͢ΔࡍͷʮޓϞʔυʯΛఏڙ͢Δ w 4XJGU9ܥͷ߹ɺ͍͔ͭ͘ͷ4FOEBCMFνΣοΫΛ੍͢Δ w 4FOEBCMFະରԠͷϞδϡʔϧͰ༻͢Δ߹4FOEBCMFͱ Έͳ͞Εͳ͍
4FOEBCMF͕એݴ͔Βফ͑Δ
!4FOEBCMFJNQPSU w 4FOEBCMFະରԠͷϥΠϒϥϦϞδϡʔϧͷܕએݴΛ JNQPSUͯ͠4XJGU$PODVSSFODZͰ༻͍ͨ͠߹ʹ༻Ͱ͖ Δ w JNQPSUͨ͠Ϟδϡʔϧ͕4FOEBCMFະରԠͷ߹ɺ 4FOEBCMFνΣοΫΛ͑Δ Τϥʔʹ͠ͳ͍
w JNQPSUͨ͠Ϟδϡʔϧ͕4FOEBCMFʹରԠ͢Δͱɺ4FOEBCMF νΣοΫ͕͞ΕΔΑ͏ʹͳΔ
0CKFDUJWF$એݴͷ4FOEBCMF w 0CKFDUJWF$͔ΒJNQPSUͨ͠ܕ͕4FOEBCMF͔OPO4FOEBCMF Ͱͳ͍͔ΛϔομϑΝΠϧͰ໌ࣔతʹࢦఆ͢Δ w TXJGU@BUUS l!4FOEBCMF 4XJGUແ݅ʹશͳ4FOEBCMFͷ४ڌΛ߹͢Δ w
҉తʹTXJGU@BUUS l!4FOEBCMFz ͕༩͞ΕΔ BTZODʹม͞ΕΔϝιουͷҾͷDPNQMFUJPO)BOEMFSͷϒϩοΫ FOVN@FYUFOTJCJMJUZ /4@&/6. OT@FSSPS@EPNBJO /4@&3303 fl BH@FOVN /4@015*0/4 TXJGU@XSBQQFS /4@5:1&%@&/6.
w TXJGU@BUUS l!@OPO4FOEBCMF TXJGU@BUUS l!4FOEBCMF ͕͑ΔॴͰ͑Δ ಉ͡એݴܕʹ͍ͨTXJGU@BUUS l!4FOEBCMF
ແࢹ͞Εͨ w TXJGU@BUUS !@OPO4FOEBCMF @BTTVNFE ಉ͡એݴܕʹ͍ͨTXJGU@BUUS l!4FOEBCMFz ແࢹ͞Εͳ͍ 0CKFDUJWF$એݴͷ4FOEBCMF
0CKFDUJWF$ϧʔϧ·ͱΊ w TXJGU@BUUS l!@OPO4FOEBCMFz ͳΒ໌ࣔతʹOPO4FOEBCMF w TXJGU@BUUS l!4FOEBCMFz ·ͨ҉తʹ༩͞ΕΔͷ໌ ࣔతʹ4FOEBCMF
w TXJGU@BUUS l!@OPO4FOEBCMF @BVEJUFE z ͳΒ໌ࣔతʹ OPO4FOEBCMF w ͪ͜Βʹ߹கͨ͠ͷ໌ࣔతʹ4FOEBCMF w ͦͷଞOPO4FOEBCMF
0CKFDUJWF$3FHJPOϕʔενΣοΫ w @@48*'5@"553@46110354@4&/%"#-&@%&$-4ͷͰର Ԡͷ༗ແΛࢦఆͰ͖Δ w DMBOHBUUSJCVUFQSBHNBͰར༻Մೳ
*NQSPWJOH4FOEBCMF*OGFSFODF 1JUDI ه IUUQTHJUIVCDPN%PVH(SFHPSTXJGUFWPMVUJPOCMPCTFOEBCMFJOGFSFODFQSPQPTBMTOOOOTFOEBCMFJOGFSFODFNE
4FOEBCMFͷద߹ͷෛ୲ΛݮΒ͍ͨ͠
SFRVJSFFYQMJDJUTFOEBCMF w ίϯύΠϥϑϥά w ϓϩτίϧҎ֎ͷQVCMJD ·ͨPQFO ͳܕ໌ࣔతʹ 4FOEBCMFɺ·ͨOPO4FOEBCMF ˞ Λࢦఆ͠ͳ͚ΕͳΒ
ͳ͍ɻ ˞OPO4FOEBCMFͷࢦఆํ๏ݕ౼த !VOBWBJMBCMF4FOEBCMFͳͲ wࢦఆ͞Ε͍ͯͳ͍߹ fi YJU͖ͷXBSOJOH͕ग़ྗ͞ΕΔɻج ຊతʹͦΕʹैͬͯίʔυͷมΛߦ͑ྑ͍ͷͰɺܕΛ୳ ͯ͠ม͢Δͱ͍͏ෛ୲͕ݮΔ