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
Asyncで 非同期処理を 少しだけ楽に書く/ ruby_with_async
Search
Wataru Morita
May 08, 2019
Technology
0
220
Asyncで 非同期処理を 少しだけ楽に書く/ ruby_with_async
Wataru Morita
May 08, 2019
Tweet
Share
More Decks by Wataru Morita
See All by Wataru Morita
thanks_react_router_v7
tascript
0
180
5-things-for-front-end
tascript
0
10k
legacy_code_fukuoka_js
tascript
1
450
svelte_typescript_fukuoka_ts
tascript
1
470
enjoy_mruby_2021
tascript
0
110
TypeScript_BFF
tascript
4
4.8k
frontend_to_cli_tool_by_rust
tascript
0
570
nestjs_typeorm
tascript
0
670
Other Decks in Technology
See All in Technology
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.4k
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
12
4.6k
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
410
AR Guitar: Expanding Guitar Performance from a Live House to Urban Space
ekito_station
0
270
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
540
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
230
Building Serverless AI Memory with Mastra × AWS
vvatanabe
1
730
202512_AIoT.pdf
iotcomjpadmin
0
150
さくらのクラウド開発ふりかえり2025
kazeburo
2
1.2k
テストセンター受験、オンライン受験、どっちなんだい?
yama3133
0
190
意外と知らない状態遷移テストの世界
nihonbuson
PRO
1
300
Amazon Bedrock Knowledge Bases × メタデータ活用で実現する検証可能な RAG 設計
tomoaki25
6
2.6k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
21k
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
380
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
94k
Exploring anti-patterns in Rails
aemeredith
2
210
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
From π to Pie charts
rasagy
0
92
Information Architects: The Missing Link in Design Systems
soysaucechin
0
720
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Google's AI Overviews - The New Search
badams
0
870
The untapped power of vector embeddings
frankvandijk
1
1.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Discover your Explorer Soul
emna__ayadi
2
1k
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によるボトルネックの解消 非同期処理のネスト、コールバックが発生し始めた 非同期処理の結果について例外処理を書きたい 非同期処理も簡潔に書きたい