Goroutine leak profiles¶
A new profile type that reports leaked goroutines is now available as an experiment. The new profile type, named goroutineleak in the runtime/pprof package, may be enabled by setting GOEXPERIMENT=goroutineleakprofile at build time. Enabling the experiment also makes the profile available as a net/http/pprof endpoint, /debug/pprof/goroutineleak.
The following example showcases a real-world goroutine leak that can be revealed by the new profile:
A new profile type that reports leaked goroutines is now available as an experiment. The new profile type, named goroutineleak in the runtime/pprof package, may be enabled by setting GOEXPERIMENT=goroutineleakprofile at build time. Enabling the experiment also makes the profile available as a net/http/pprof endpoint, /debug/pprof/goroutineleak.
The following example showcases a real-world goroutine leak that can be revealed by the new profile:
type result struct {
res workResult
err error
}
func processWorkItems(ws []workItem) ([]workResult, error) {
// Process work items in parallel, aggregating results in ch.
ch := make(chan result)
for _, w := range ws {
go func() {
res, err := processWorkItem(w)
ch <- result{res, err}
}()
}
// Collect the results from ch, or return an error if one is found.
var results []workResult
for range len(ws) {
r := <-ch
if r.err != nil {
// This early return may cause goroutine leaks.
return nil, r.err
}
results = append(results, r.res)
}
return results, nil
}
λ
The usage of pointers so so crazy in Golang. To find this line, I have spent 2 hours of debugging 🥲.
When you realize your implementation don’t solve anything, just chill and wait someone to solve this issue
😶🌫️😶🌫️😶🌫️
It is because the source actually somehow trash. You can’t understand anything easily
😶🌫️😶🌫️😶🌫️
Adding_a_while_Loop_to_the_Go_124_Compiler_2025_Guide_by_Aleksei.pdf
734.5 KB
Adding a while loop into Go compiler
New year with a new editor.
- Keymaps are learnt
- Plugins are installed
Ready, set, go!
Thanks for challenge to Haskell Uzbekistan
My setup here: https://github.com/abdivasiyev/nix/tree/master/modules/home/emacs
- Keymaps are learnt
- Plugins are installed
Ready, set, go!
Thanks for challenge to Haskell Uzbekistan
My setup here: https://github.com/abdivasiyev/nix/tree/master/modules/home/emacs
👍2
The magit is a real git magic!
I can't believe that, finally I found my best client for git🫡
I can't believe that, finally I found my best client for git🫡
👍2
After writing a few days in a ELisp, I am a master to find an incorrect parentheses with naked eye🤣
😁1
λ
New year with a new editor. - Keymaps are learnt - Plugins are installed Ready, set, go! Thanks for challenge to Haskell Uzbekistan My setup here: https://github.com/abdivasiyev/nix/tree/master/modules/home/emacs
This media is not supported in your browser
VIEW IN TELEGRAM
New year with a new car 🤩🤩
🏆2
Forwarded from Denis Sexy IT 🤖
Сам инструмент бесплатный, но команда что его строила, зарабатывала на платных библиотеках из готовых шаблонов и компонентов (готовый красивый интерфейс, бери и вставляй на сайт) и на программе поддержки от компаний и пользователей
В ноябре, в их репозитории всплыла идея: добавить на сайт специальную страницу
/llms.txt – одну большую "упрощённую" текстовую версию всей документации, чтобы кодинг агенты и LLM могли легче её читать. Казалось бы: всем удобнее, меньше ошибок, быстрее находишь нужное и тпСоздатель Tailwind отказался и прямо сказал, что АИ уже ударил по их бизнесу: люди перестали заходить на сайт за документацией (-40% по посещениям), а этот трафик раньше конвертировал юзеров в платные услуги. В итоге выручка просела на 80%, уже дошло до увольнений, и делать АИ‑доступ к знаниям ещё проще – авторам страшно, потому что это может добить единственный канал продаж
Похоже, это одна из первых крупных жертв эпохи АИ в разработке: популярнейший проект, который все используют, но которому внезапно стало не на что жить
Да, кодинг с агентами работает – дальше таких будет больше, увы
Please open Telegram to view this post
VIEW IN TELEGRAM