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]
複雑さに立ち向かうための ソフトウェア開発入門
shiz
3
1.3k
座談会 「Strict ConcurrencyとSwift 6が開く新時代: 私たちはどう生きるか?」
shiz
5
13k
(非公開スライド追加)座談会 「Strict ConcurrencyとSwift 6が開く新時代: 私たちはどう生きるか?」
shiz
1
360
複雑さに立ち向かうためのコードリーディング入門
shiz
35
13k
Swift Observation
shiz
5
780
Swift Reflection
shiz
1
180
Swift Concurrency Next Step
shiz
7
7.7k
そろそろSwift Concurrency
shiz
1
460
Hello, Swift Concurrency world.
shiz
9
5.2k
Other Decks in Programming
See All in Programming
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
360
Recoilを剥がしている話
kirik
5
6.6k
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
700
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
MCP with Cloudflare Workers
yusukebe
2
220
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
700
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Facilitating Awesome Meetings
lara
50
6.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Visualization
eitanlees
146
15k
Fireside Chat
paigeccino
34
3.1k
Adopting Sorbet at Scale
ufuk
73
9.1k
A better future with KSS
kneath
238
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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͕ग़ྗ͞ΕΔɻج ຊతʹͦΕʹैͬͯίʔυͷมΛߦ͑ྑ͍ͷͰɺܕΛ୳ ͯ͠ม͢Δͱ͍͏ෛ୲͕ݮΔ