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
16
マルチスレッディングの仕組み (2016)
4D Japan
November 01, 2024
Tweet
Share
More Decks by 4D Japan
See All by 4D Japan
Unicodeの話 (2007)
miyako
0
4
Unicodeの話 (2008)
miyako
0
9
Google Apps Integration (2012)
miyako
0
8
Creating Custom Widgets (2012)
miyako
0
7
地図データの活用 (2016)
miyako
0
12
オブジェクトフィールド (2016)
miyako
0
4
新しい変換タグ (2016)
miyako
0
9
プログラムコードの最適化 (2016)
miyako
0
11
自動アップグレード (2016)
miyako
0
6
Other Decks in Technology
See All in Technology
宇宙最速のランチRecap LT会(開発者ツール&運用監視編)
nnydtmg
1
190
開志専門職大学特別講義 2024 オープニング
1ftseabass
PRO
0
230
品質管理チームのEMとして大事にしていること / QA EM
nihonbuson
0
880
AWS re:Invent 2024登壇資料(GBL206-JA: Unleashing the power of generative AI on AWS for your business)
minorun365
PRO
7
260
Reliability Engineering at Studist
katsuhisa91
PRO
0
130
スパイクアクセス対策としての pitchfork 導入
riseshia
0
210
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
120
アジャイルテストの4象限で考える プロダクト開発の品質への向き合い方
nagano
1
980
プロダクトの爆速開発を支える、 「作らない・削る・尖らせる」技術
applism118
10
9.3k
最近のUplift Modeling手法にRでトライ
hskksk
0
200
Connect × Server-Side Kotlinで実現する!スキーマ駆動開発と品質改善の実践
sansantech
PRO
1
160
MySQL 8.0 から PostgreSQL 16 への移行と RLS 導入までの道のりと学び
baseballyama
0
1.2k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Six Lessons from altMBA
skipperchong
27
3.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Docker and Python
trallard
41
3.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.8k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
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