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
Transcript
14 slides
"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によるボトルネックの解消 非同期処理のネスト、コールバックが発生し始めた 非同期処理の結果について例外処理を書きたい 非同期処理も簡潔に書きたい
More Decks by Wataru Morita
See All by Wataru Morita
JMAPが描くメールの未来
tascript
0
230
thanks_react_router_v7
tascript
0
240
5-things-for-front-end
tascript
0
11k
legacy_code_fukuoka_js
tascript
1
500
svelte_typescript_fukuoka_ts
tascript
1
500
enjoy_mruby_2021
tascript
0
140
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
設計手法を「道具」として使いこなすために
a_suenami
7
1.5k
みん強Lightning! データ基盤ひとりでできるかな
endonanana
0
120
閉域網でのAPI公開の選択肢全部比較!
takano0131
4
620
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.9k
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
130
OWASP AI Agentic Top10に準拠するクラウドネイティブなガードレールの実践(CNDW 2026)
keitah
1
370
cdkdがどんだけ早いか、実際に動かして見てみよう
smt7174
1
140
飯から始まるデータエンジニア
sansantech
PRO
0
120
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
1k
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
4
500
AI×アジャイルで、石橋を高速で叩きながら渡る~電力会社がゼロから築いた会員サイト改善プロセス~ / 20261112 Ayami Kanazawa & Shigeru Hirai
shift_evolve
PRO
1
110
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
1
650
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
560
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
290
The Cost Of JavaScript in 2023
addyosmani
56
10k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
540
Designing Experiences People Love
moore
143
24k
Prompt Engineering for Job Search
mfonobong
0
590
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k