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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Wataru Morita
May 08, 2019
Technology
250
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
160
thanks_react_router_v7
tascript
0
230
5-things-for-front-end
tascript
0
11k
legacy_code_fukuoka_js
tascript
1
480
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
600
nestjs_typeorm
tascript
0
690
Other Decks in Technology
See All in Technology
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
4
610
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
8
950
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
170
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
3
3k
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
空間オーディオで過去の 自分(ゴースト)と競うランニング 〜HealthKitのルートを足音に変える実装〜
nao_randd
0
220
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
22
14k
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.8k
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.6k
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
1
360
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
580
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
190
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
570
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
800
Writing Fast Ruby
sferik
630
63k
Prompt Engineering for Job Search
mfonobong
0
450
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
The Spectacular Lies of Maps
axbom
PRO
1
990
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Music & Morning Musume
bryan
48
7.4k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Believing is Seeing
oripsolob
1
220
The SEO identity crisis: Don't let AI make you average
varn
0
560
4 Signs Your Business is Dying
shpigford
187
23k
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によるボトルネックの解消 非同期処理のネスト、コールバックが発生し始めた 非同期処理の結果について例外処理を書きたい 非同期処理も簡潔に書きたい