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
How Communicating Sequential Goroutines Work
Search
Koki Ide
March 25, 2017
Technology
2
19k
How Communicating Sequential Goroutines Work
Koki Ide
March 25, 2017
Tweet
Share
More Decks by Koki Ide
See All by Koki Ide
次世代のコンテナランタイム!?gVisorのコードを読みながら理解してみる
niconegoto
6
6k
How to achieve parallel compilation in Go 1.9
niconegoto
6
6.6k
Let's Realm
niconegoto
0
470
Other Decks in Technology
See All in Technology
徹底比較!HA Kubernetes ClusterにおけるControl Plane LoadBalancerの選択肢
logica0419
2
140
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
120
製造現場のデジタル化における課題とPLC Data to Cloudによる新しいアプローチ
hamadakoji
0
210
RustとWebAssemblyを使って高速な画像処理をWebアプリで実行しよう
rebonire626
0
110
地理情報データをデータベースに格納しよう~ GPUを活用した爆速データベース PG-Stromの紹介 ~
sakaik
1
110
AWS パートナー企業でテクニカルサポートに従事して 3年経ったので思うところをまとめてみた
kazzpapa3
1
220
ライブラリでしかお目にかかれない珍しい実装
mikanichinose
2
330
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Platform Engineering ことはじめ
oracle4engineer
PRO
8
810
福岡新卒エンジニアの会
teba_eleven
1
190
Engineering at LY Corporation
lycorp_recruit_jp
0
320
ジョブマッチングサービスにおける相互推薦システムの応用事例と課題
hakubishin3
3
620
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
390
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
Statistics for Hackers
jakevdp
796
220k
Building an army of robots
kneath
302
42k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
GitHub's CSS Performance
jonrohan
1030
460k
Measuring & Analyzing Core Web Vitals
bluesmoon
3
76
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Building Adaptive Systems
keathley
38
2.3k
BBQ
matthewcrist
85
9.3k
Transcript
None
,PLJ*EF !OJDPOFHPUP .FSDBSJ4PV[PI*OD TPQIPNPSFPGUIF6OJWFSTJUZPG5PLZP
ࠓͷͷΰʔϧ ɾ$PODVSSFODZʹ͍ͭͯৄ͘͠ͳΔ ɾ(PͰ.FTTBHFQBTTJOH͕Ͳ͏࣮ݱ͞Ε͍ͯΔ͔Δ ˠ(PͬͯεήʔʂʂͬͯͳΔ
"HFOEB 4IBSFENFNPSZBOE.FTTBHFQBTTJOH*1$ $PODVSSFODZ.PEFM $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF
$PODVSSFODZ.PEFM
$PODVSSFODZ.PEFM %POPUDPNNVOJDBUFCZTIBSJOHNFNPSZ JOTUFBE TIBSFNFNPSZCZDPNNVOJDBUJOH
ͦͦͳͥϓϩηεؒ௨৴ *1$ ͕ඞཁͳͷ͔ ɾෳϢʔβʔ͕ใʹฒߦΞΫηεͰ͖Δඞཁ ɾܭࢉͷߴԽ ɾγεςϜΛϞδϡʔϧԽͯ͠ߏ͍ͨ͠ $PODVSSFODZ.PEFM
ɾ4IBSFENFNPSZ*OUFSQSPDFTT$PNNVOJDBUJPO ɾ.FTTBHFQBTTJOH*OUFSQSPDFTT$PNNVOJDBUJPO $PODVSSFODZͷΞϓϩʔνํ๏ *1$ େ͖͘छྨʹ͔ΕΔ ڠௐϓϩηεؒͰڞ༗ϝϞϦྖҬ͕֬อ͞ΕΔ ڠௐϓϩηεؒͷϝοηʔδަͰ௨৴͢Δ $PODVSSFODZ.PEFM
ಉ͡ॲཧ ੜ࢈ऀফඅऀ Λॻ͍ͯΈΔ ɾ4IBSFENFNPSZ*OUFSQSPDFTT$PNNVOJDBUJPO ɾ.FTTBHFQBTTJOH*OUFSQSPDFTT$PNNVOJDBUJPO ڠௐϓϩηεؒͰڞ༗ϝϞϦྖҬ͕֬อ͞ΕΔ ڠௐϓϩηεؒͷϝοηʔδަͰ௨৴͢Δ $PODVSSFODZ.PEFM
ɾ4IBSFENFNPSZ*OUFSQSPDFTT$PNNVOJDBUJPO $ Ͱॻ͍ͯΈͨྫ $PODVSSFODZ.PEFM
ੜ࢈ऀHPPETΛੜ࢈ͯ͠RVFVFʹQVTI͢Δ ফඅऀEPOFͷΛݟͯɺHPPET͕ۭ͔Ͳ͏͔ ֬ೝͯ͠ɺRVFVF͔ΒQPQ͢Δ ফඅ͠ऴΘͬͨΒEPOFΛUSVFʹ͢Δ $PODVSSFODZ.PEFM
(PͰॻ͍ͯΈͨྫ ɾ.FTTBHFQBTTJOH*OUFSQSPDFTT$PNNVOJDBUJPO $PODVSSFODZ.PEFM
ੜ࢈ऀHPPETΛੜ࢈ͯ͠DIBOOFMʹ͛Δ ੜ࢈͕ऴΘͬͨΒEPOFΛ͛Δ ফඅऀDIBOOFM͔Βड͚औΔ EPOFΛड͚औͬͨΒॲཧΛऴ͑Δ $PODVSSFODZ.PEFM
4IBSFENFNPSZBOE.FTTBHFQBTTJOH*1$
$PODVSSFODZ.PEFM
4IBSFENFNPSZ*OUFSQSPDFTT$PNNVOJDBUJPO جຊతʹ04ϓϩηεΛଞϓϩηεͷϝϞϦʹΞΫηεͤ͞ͳ͍ ͜ͷ੍ΛͭҎ্ͷϓϩηε͕औΓআ͘ඞཁ͕͋Δ σʔλͷܗࣜҰϓϩηεؒͰܾΊΔͨΊɺ04ؔΘΒͳ͍ ಉ͡Ґஔʹಉ࣌ʹॻ͖ࠐ·ͳ͍͜ͱΛ࣮֬ʹ͢Δඞཁ͕͋Δ 4IBSFENFNPSZϞσϧͷಛ
ϝϞϦͰߦ͑ΔͷͰૣ͍ ϝοηʔδύογϯάҰൠతʹTZTDBMM Ͱ࣮͞ΕΔͷͰɺΧʔωϧΛհࡏͨ͠ࣄΛඞཁͱ͢ΔͨΊ͍ ϨʔείϯσΟγϣϯ͕ى͜Βͳ͍Α͏ʹϩοΫΛͱΔ͜ͱ͕ଟ͍ͨΊ Ұൠతʹ࣮͍͠ͱ͞ΕΔ 4IBSFENFNPSZ*OUFSQSPDFTT$PNNVOJDBUJPO 4IBSFENFNPSZϞσϧͷಛ
.FTTBHFQBTTJOH*OUFSQSPDFTT$PNNVOJDBUJPO
খ͍͞σʔλΛަ͢Δͷʹ༗ޮ .FTTBHFQBTTJOHϞσϧͷಛ 4IBSFENFNPSZϞσϧʹൺ࣮ͯ༰қͱ͞ΕΔ .FTTBHFQBTTJOH*OUFSQSPDFTT$PNNVOJDBUJPO
$PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF
$PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF HPSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦ TFMFDU DIBOOFM HPSPVUJOFؒͰͷϝοηʔδύογϯάΛߦ͏ CZUFͷܰྔͳεϨουͷΑ͏ͳͷ ෳͷDIBOOFMͷड৴Λಉ࣌ʹߦ͏߹ͳͲʹ༻͍Δ
HPSPVUJOF ҙͷͷ04εϨουʹҙͷͷΰϧʔνϯΛεέδϡʔϦϯά͢Δ ./εέδϡʔϦϯάΛ࠾༻ ίϯςΩετεΠονΛ࣮͘͢ߦ͠γεςϜͷͯ͢ͷί ΞΛ׆༻Ͱ͖Δ͕εέδϡʔϥʔͷՃ͕ࡶ (Pͦͷࡶ͞ΛؾʹͤͣίʔυΛॻ͚ΔΑ͏ʹͯ͘͠Ε͍ͯΔ ਆʂʂ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦
IUUQTUBMLTHPEPDPSHHJUIVCDPNOJDPOFHPUPUBMLTDPODVSSFODZTMJEF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦
IUUQRJJUBDPNOJDPOFHPUPJUFNTEDEGDDDC $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦
DIBOOFM ܕࢦఆ͕ՄೳͰɺTFOESFDFJWFͰϒϩοΫ͢Δ pSTUDMBTTWBMVFͳͷͰҾΓʹ͑Δ CV⒎FSΛࢦఆ͢Δ͜ͱͰ4FNBQIPSFతͳ͍ํՄೳ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦
#MPDLJOH2VFVFతͳ͍ํ ༗ݶPSແݶͷCV⒎FSΛ࣋ͭΩϡʔɻ ΩϟύγςΟΛӽ͑ͯՃ͠Α͏ͱ͢Δͱ͖ٴͼۭ ͷঢ়ଶͰऔΓग़ͦ͏ͱ͢Δͱ͖ʹϒϩοΫ͢Δ͜ͱ ͰɺͭͷϓϩηεͰڞ༗ࢿݯͷॴ༗ݖΛมߋͯ͠ ಉظ͢Δɻ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦ DIBOOFM
4FNBQIPSFతͳ͍ํ ڞ༗ࢿݯʹରͯ͠ΞΫηεՄೳͳ ϓϩηεͷΛ੍ݶ͢Δ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦ DIBOOFM
TFMFDU ෳͷDIBOOFMͷಡΈॻ͖Λ੍ޚͯ͘͠ΕΔ UJNFPVUఆظ࣮ߦͳͲʹ༻͍Δ͜ͱ͕Ͱ͖Δ DIBOOFMΛڠྗʹαϙʔτ ਆ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦
TFMFDU UJNFPVU ඵ͢ΔͱUJNFPVU͢Δ ԼΛඵʹ͢ΔͱzSFTVMUz͕ฦΔ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦
ఆظ࣮ߦ ຖඵఆظ࣮ߦ͞Εɺ ඵͰUJNFPVU͢Δ $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOF $PNNVOJDBUJOH4FRVFOUJBM(PSPVUJOFͰ༻͍ΒΕ͍ͯΔ෦ TFMFDU
4VNNBSZ $PODVSSFODZʹେ͖͚ͯ͘ 4IBSFENFNPSZͱ.FTTBHFQBTTJOH͕͋Γɺརͱ͕ܽ͋Δ DIBOOFMͱTFMFDUͰڧྗͳ.FTTBHFQBTTJOHΛ࣮ݱͰ͖Δ TZODύοέʔδΛ͑ഉଞ੍ޚͰ͖Δ͚Ͳɺ (PΒ͘͠DIBOOFM͍͜ͳͯ͠zTIBSFNFNPSZCZDPNNVOJDBUJOHz HPSPVUJOF͍͢͝ɻSVOUJNFҎԼΛಡ͏ʂʂ
(P࠷ߴʂʂʂʂʂ 4VNNBSZ
,PLJ*EF !OJDPOFHPUP .FSDBSJ4PV[PI*OD TPQIPNPSFPGUIF6OJWFSTJUZPG5PLZP