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
Go1.25で追加されたWaitGroup.Goの紹介
Search
ともやん
August 29, 2025
Programming
0
73
Go1.25で追加されたWaitGroup.Goの紹介
株式会社アドシード主催「水道橋BeerBash」で登壇しました!
そのときに使用したスライドです!
ともやん
August 29, 2025
Tweet
Share
Other Decks in Programming
See All in Programming
Oxlintはいいぞ
yug1224
5
1.4k
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
300
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
1k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
740
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
630
並行開発のためのコードレビュー
miyukiw
0
1.3k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
140
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Package Management Learnings from Homebrew
mikemcquaid
0
230
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
150
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
810
Raft: Consensus for Rubyists
vanstee
141
7.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
66
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
The World Runs on Bad Software
bkeepers
PRO
72
12k
Transcript
Go 1.25 で追加された WaitGroup.Go の紹介 2025.08.29 株式会社アドシード 平野智也
名前 平野智也(ひらの ともや) 所属 株式会社アドシード(2023 年11 月〜) バックエンドがメイン Go ・PHP ・Node.js
etc... 今年6 月からテックブログ運営に参画 趣味 ジム・サウナ・読書・映画鑑賞 etc...
目次 Go 1.25 Release goroutine とは Go 1.24 までのgoroutine Go
1.25 からのgoroutine WaitGroup.Go() 導入のメリット まとめ
Go 1.25 Release Go 1.25 Release 2025 年08 月12 日にリリース
Go は半年に1 回マイナーバージョンがリリースされる ライブラリ・ランタイム・ツールチェーンの追加、変更 今回の注目 testing/synctest パッケージの追加 encoding/json/v2 パッケージの追加 sync パッケージにWaitGroup.Go メソッド実装
今回はGo 1.25 で追加された sync パッケージの WaitGroup.Go メソッドを紹介! Go 1.25 Release
goroutine とは Go ランタイムで管理される軽量スレッド 並行処理を実現するための仕組み 並行:複数のタスクが同時進行しているように見せる 並列:複数のタスクを物理的に同時に実行する 「go 」というキーワードを関数の前につけることで起動 I/O
が絡むケースで効果を発揮する
Go 1.24 までのgoroutine
sync.WaitGroup 複数のgoroutine の終了を待つ ための仕組み Add メソッド Goroutine カウンタを増やす Done メソッド
Goroutine カウンタを減らす Wait メソッド カウンタが0 になるまで待つ Go 1.24 までのgoroutine
Go 1.24 までのgoroutine
Go 1.25 からのgoroutine
sync.WaitGroup 複数のgoroutine の終了を待つ ための仕組み Go メソッド 内部でAdd メソッドと Done
メソッドを呼ぶ Wait() カウンタが0 になるまで待つ Go 1.25 からのgoroutine
Go 1.25 からのgoroutine
WaitGroup.Go() 導入のメリット Go 1.24 まで Add() やDone() の記述漏れのリスク 思わぬ挙動となってしまう Go
1.25 から Go() では内部でAdd() やDone() を呼び出している 簡潔かつ安全に想定した挙動を得られる
まとめ goroutine とは Go ランタイムで管理される軽量スレッド 並行処理を実現するための仕組み Go 1.25 からのgoroutine WaitGroup.Go()
を使う 内部でAdd() とDone() を呼び出している 簡潔かつ安全に想定した挙動を得られる
出典 Go Packages https://pkg.go.dev/sync#WaitGroup.Go Go 1.25 Release Notes https://tip.golang.org/doc/go1.25#syncpkgsync Future
Tech Blog https://future-architect.github.io/articles/20250801a/ RitoLabo https://www.ritolab.com/posts/323
宣伝 アドシードでは一緒に働く仲間を募集してます! 新しい技術・プロジェクトに挑戦できる環境です 困った時にはすぐに相談できる、心強い仲間もいます まずはカジュアルにお話ししませんか? 詳しくはこちら!
宣伝 アドシードではテックブログをやってます! AdseedTechBlog という名前です 毎週金曜日に更新予定です ビアバッシュの様子も随時載せていく予定です 個人でZenn やってます! Go についての記事を書いています
最近ちょっと頑張って書いています
ご清聴ありがとうございました!