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
マルチスレッディングの仕組み (2016)
Search
4D Japan
November 01, 2024
Technology
0
36
マルチスレッディングの仕組み (2016)
4D Japan
November 01, 2024
Tweet
Share
More Decks by 4D Japan
See All by 4D Japan
4D 20 R9
miyako
0
10
4D 20 R7 & R8
miyako
0
49
Unicodeの話 (2007)
miyako
0
19
Unicodeの話 (2008)
miyako
0
28
Google Apps Integration (2012)
miyako
0
27
Creating Custom Widgets (2012)
miyako
0
27
地図データの活用 (2016)
miyako
0
31
オブジェクトフィールド (2016)
miyako
0
16
新しい変換タグ (2016)
miyako
0
35
Other Decks in Technology
See All in Technology
JavaScript 研修
recruitengineers
PRO
3
180
制約理論(ToC)入門
recruitengineers
PRO
3
310
Go で言うところのアレは TypeScript で言うとコレ / Kyoto.なんか #7
susisu
7
1.8k
攻撃と防御で実践するプロダクトセキュリティ演習~導入パート~
recruitengineers
PRO
2
200
Figma + Storybook + PlaywrightのMCPを使ったフロントエンド開発
yug1224
9
2.7k
[CVPR2025論文読み会] Linguistics-aware Masked Image Modelingfor Self-supervised Scene Text Recognition
s_aiueo32
0
210
人と組織に偏重したEMへのアンチテーゼ──なぜ、EMに設計力が必要なのか/An antithesis to the overemphasis of people and organizations in EM
dskst
6
620
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
30k
Android Studio の 新しいAI機能を試してみよう / Try out the new AI features in Android Studio
yanzm
0
270
我々は雰囲気で仕事をしている / How can we do vibe coding as well
naospon
2
220
7月のガバクラ利用料が高かったので調べてみた
techniczna
3
440
AIとTDDによるNext.js「隙間ツール」開発の実践
makotot
6
700
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Ace a Technical Interview
jacobian
279
23k
Unsuck your backbone
ammeep
671
58k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
900
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
480
The Language of Interfaces
destraynor
160
25k
Transcript
ϚϧνεϨοσΟϯάͷΈ inside multi-threading Laurent Esnault, Vice President of Engineering ϩϗϯɾΤϊʔ
༻ޠղઆ
ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ
༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ •
04͕εέδϡʔϧΛཧ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ •
04͕εέδϡʔϧΛཧ • ۭ͍͍ͯΔίΞΛͯ͢ར༻Ͱ͖Δ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ •
04͕εέδϡʔϧΛཧ • ۭ͍͍ͯΔίΞΛͯ͢ར༻Ͱ͖Δ • ϢʔβʔΠϯλϑΣʔε/( ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
U U $16 $16 ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" U U $16 $16 *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" ϓϩηε# U U $16 $16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ
༻ޠղઆ
ϓϩηε" ϓϩηε" ϓϩηε# U U $16 $16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ
ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" ϓϩηε" ϓϩηε# U U $16 $16 U U $16
$16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" ϓϩηε# ϓϩηε" ϓϩηε" ϓϩηε# U U $16 $16 U
U $16 $16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϦΤϯϓςΟϒϞʔυ
ϓϦΤϯϓςΟϒϞʔυ • %#%
ϓϦΤϯϓςΟϒϞʔυ • %#% • 42-
ϓϦΤϯϓςΟϒϞʔυ • %#% • 42- • )551
σϞϯετϨʔγϣϯ %ϓϩηεΛϓϦΤϯϓςΟϒϞʔυͰ࣮ߦ͢Δ
BE PREPARED NOT SCARED ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
ΦϯϥΠϯυΩϡϝϯτ
ΦϯϥΠϯυΩϡϝϯτ
࣮ߦϞʔυ
࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ ࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ ࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ ࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ ࣮ߦϞʔυ ίϯύΠϥʔʹΑΔνΣοΫ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ • ϓϦΤϯϓςΟϒରԠ ࣮ߦϞʔυ ίϯύΠϥʔʹΑΔνΣοΫ
ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ • ϓϦΤϯϓςΟϒରԠ • ϓϦΤϯϓςΟϒඇରԠ
࣮ߦϞʔυ ίϯύΠϥʔʹΑΔνΣοΫ ϝιουϓϩύςΟ
σϞϯετϨʔγϣϯ ࣮ߦϞʔυ
ॳΊʹݺΕΔ ϓϩδΣΫτϝιου͚ͩ มߋ͢Εྑ͍ ϙΠϯτ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
ίΦϖϥςΟϒ
ίΦϖϥςΟϒ <>myVar:=<>myVar+1
ίΦϖϥςΟϒ <>myVar:=<>myVar+1 IDLE IDLE
ϓϦΤϯϓςΟϒ <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 IDLE IDLE
ϓϦΤϯϓςΟϒ <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 IDLE IDLE IDLE
<>myVar:=<>myVar+1 CLEAR SEMAPHORE("myVar") If(Not(Semaphore("myVar";1000))) ϓϦΤϯϓςΟϒ End if
ΠϯλʔϓϩηεΛΘͣʹͲ͏ͬͯ ϓϩηεؒͰใΛΓऔΓ͢Δͷ
$"--803,&3
$"--803,&3 • ໊લ͕͞ΕͨϝοηʔδϘοΫε
$"--803,&3 • ໊લ͕͞ΕͨϝοηʔδϘοΫε • ϝιουΛ࣮ߦ͢ΔͨΊͷϓϩηε
$"--803,&3 • ໊લ͕͞ΕͨϝοηʔδϘοΫε • ϝιουΛ࣮ߦ͢ΔͨΊͷϓϩηε • $"--803,&3ͰϝοηʔδΛಧ͚Δ - Ҿ/FXQSPDFTTʹࣅ͍ͯΔ -
ҙͷϓϩδΣΫτϝιου - ҙͷύϥϝʔλʔ
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε
myWorker CALL WORKER("myWorker"; "myMethod";$param) ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε
myWorker CALL WORKER("myWorker"; "myMethod";$param) ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε
myWorker CALL WORKER("myWorker"; "myMethod";$param) ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε you’ve got mail!
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε CALL WORKER("myWorker"; "myMethod";$param)
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε CALL WORKER("myWorker"; "myMethod";$param)
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε myMethod($param) CALL WORKER("myWorker"; "myMethod";$param)
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε CALL WORKER("myWorker"; "myMethod";$param)
σϞϯετϨʔγϣϯ ϓϩηεؒͷσʔλ௨৴
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
Ͳ͏ͬͯϓϦΤϯϓςΟϒϓϩηεͷ ϢʔβʔΠϯλϑΣʔεΛ࡞͢Δͷ
$"--'03.
$"--'03. • ΠϯυຖʹϝοηʔδϘοΫε
$"--'03. • ΠϯυຖʹϝοηʔδϘοΫε • ϑΥʔϜͷίϯςΩετͰϝιουΛ࣮ߦ͢Δ
$"--'03. • ΠϯυຖʹϝοηʔδϘοΫε • ϑΥʔϜͷίϯςΩετͰϝιουΛ࣮ߦ͢Δ • $"--'03.ͰϝοηʔδΛಧ͚Δ - Ҿ$"--803,&3ʹࣅ͍ͯΔ -
ҙͷϓϩδΣΫτϝιου - ҙͷύϥϝʔλʔ
myWindow ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ you’ve got mail!
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ myMethod($param)
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
σϞϯετϨʔγϣϯ Πϯυؒͷϝοηʔδૹड৴
Ϗοτ൛
Ϗοτ൛ Windows Mac
v12 Ϗοτ൛ Windows Mac
v12 Ϗοτ൛ Windows Mac v13 OD BC
v12 Ϗοτ൛ Windows Mac v13 OD BC v15 OD BC
v12 v15 Rx Ϗοτ൛ Windows Mac v13 OD BC v15
OD BC
v12 v15 Rx v15 R5 Ϗοτ൛ Windows Mac v13 OD
BC v15 OD BC
v12 v15 Rx v15 R5 v16 Ϗοτ൛ Windows Mac v13
OD BC v15 OD BC
ϓϦΤϯϓςΟϒϞʔυ ΫϥΠΞϯταʔόʔ σʔλϕʔε 42- )551 TUBUJD EZOBNJD ϥϯήʔδ
·ͱΊ
·ͱΊ • Ϗοτ൛ ֦ுੑ ͓ΑͼॲཧྗΞοϓͷجૅ εέʔϥϏϦςΟ ύϑΥʔϚϯε
·ͱΊ • Ϗοτ൛ ֦ுੑ ͓ΑͼॲཧྗΞοϓͷجૅ εέʔϥϏϦςΟ ύϑΥʔϚϯε • ඇಉظϝοηʔδ؆୯͔ͭೳతͳϓϩηεؒ௨৴ ηϚϑΥʔෆཁɾσουϩοΫճආ
·ͱΊ • Ϗοτ൛ ֦ுੑ ͓ΑͼॲཧྗΞοϓͷجૅ εέʔϥϏϦςΟ ύϑΥʔϚϯε • ඇಉظϝοηʔδ؆୯͔ͭೳతͳϓϩηεؒ௨৴ ηϚϑΥʔෆཁɾσουϩοΫճආ
• ૣɹɹΛೖखͯ͠׳Ε͓͖ͯ·͠ΐ͏ 3