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
6.1k
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
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.4k
技術に触れたり、顔を出そう
maruto
1
150
Formal Development of Operating Systems in Rust
riru
1
420
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
470
Building Scalable Backend Services with Firebase
wisdommatt
0
110
【JAWS-UG大阪 reInvent reCap LT大会 サンバが始まったら強制終了】“1分”で初めてのソロ参戦reInventを数字で振り返りながら反省する
ttelltte
0
140
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
220
商品レコメンドでのexplicit negative feedbackの活用
alpicola
1
340
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
210
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
200
2025年に挑戦したいこと
molmolken
0
160
Goで実践するBFP
hiroyaterui
1
120
Featured
See All Featured
Visualization
eitanlees
146
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
YesSQL, Process and Tooling at Scale
rocio
170
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Documentation Writing (for coders)
carmenintech
67
4.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
GitHub's CSS Performance
jonrohan
1030
460k
Producing Creativity
orderedlist
PRO
343
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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