Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Asyncで 非同期処理を 少しだけ楽に書く/ ruby_with_async
Search
Wataru Morita
May 08, 2019
Technology
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Asyncで 非同期処理を 少しだけ楽に書く/ ruby_with_async
Wataru Morita
May 08, 2019
More Decks by Wataru Morita
See All by Wataru Morita
JMAPが描くメールの未来
tascript
0
200
thanks_react_router_v7
tascript
0
240
5-things-for-front-end
tascript
0
11k
legacy_code_fukuoka_js
tascript
1
490
svelte_typescript_fukuoka_ts
tascript
1
500
enjoy_mruby_2021
tascript
0
130
TypeScript_BFF
tascript
4
5k
frontend_to_cli_tool_by_rust
tascript
0
610
nestjs_typeorm
tascript
0
700
Other Decks in Technology
See All in Technology
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
5
1.4k
顧客価値を追いかけたら、プライシングにたどり着いた
sansantech
PRO
2
310
AWSセキュリティで活用するAI機能
cmusudakeisuke
0
130
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
130
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
190
野蛮なアジャイル [サイボウズ発!]組織の常識を覆した反骨のスクラム実践記 / Barbaric Agile - Enterprise Agile Study Group
ama_ch
0
120
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
370
AI駆動開発における開発環境のセキュリティの考え方
yamahiro
0
150
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
360
小規模OSSモデルは サイバーセキュリティ業務に どこまで使えるか
bbrbbq
0
150
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
170
「私が一番顧客に詳しい」を捨てる~ 全員が一次情報に精通する開発チームをつくり、PMが次のボトルネックへ染み出すまで
kaminashi
1
950
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
290
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Code Reviewing Like a Champion
maltzj
529
40k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Transcript
"TZODͰ ඇಉظॲཧΛ গָ͚ͩ͠ʹॻ͘ @tascript e-ZUKA Tech Night
;͋Έ 森田 亘(たすくん@tascript) GMOペパボエンジニア Nuxt、Vue、TypeScript
3VCZͰ ඇಉظॲཧΛॻ͖͍ͨ
બࢶ Thread(並列処理) Fiber(並行処理) fork(プロセスの複製) etc…
ߟྀ͖͢ I/O待ちによるGVL(Giant VM lock)の解放 スレッドセーフなのか プリエンプティブ/ノンプリエンティブによるコンテキストスイッチ スレッドの増加によるコードの複雑化
Ԟ͕ਂ͍
ߟ͑Δ͜ͱ͕ଟ͘ͳΔ
"TZODͰ ඇಉظॲཧΛ ޮతʹॻ͚Δ
"TZOD 非同期I/Oのフレームワーク 内部ではFiberを使用 JavaScriptのasync/awaitっぽい 簡潔なシンタックスで非同期処理が実装可能
'JCFS ノンプリエンプティブな軽量スレッド 親子関係のスレッドを作成 親子間でコンテキストスイッチ コルーチンに近い ࢠ ࣌ؒ
جຊతͳૢ࡞ Asyncブロックで非同期処理を宣言 taskメソッド(read、write、sleep) 同期処理と非同期処理が明瞭になる
'JCFSͷΈͰ࣮ࢪ 同期処理と非同期処理で関数を変更 DRYとはなにか
BTZODBXBJUͬΆ͘ 非同期処理の結果を待機する 結果によって例外処理も書きやすい 同期が必要なポイントが確認しやすい
͍ॴ ブロッキングI/Oによるボトルネックの解消 非同期処理のネスト、コールバックが発生し始めた 非同期処理の結果について例外処理を書きたい 非同期処理も簡潔に書きたい