Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Hacker NewsEnglish · 2 days ago

Waitgroups: What they are, how to use them and what changed with Go 1.25

mfbmina.dev

external-link
message-square
0
fedilink
1
external-link

Waitgroups: What they are, how to use them and what changed with Go 1.25

mfbmina.dev

RSS BotMB to Hacker NewsEnglish · 2 days ago
message-square
0
fedilink
Waitgroups: what they are, how to use them and what changed with Go 1.25
mfbmina.dev
external-link
Imagine the following problem: you need to process hundreds of records and generate a single output. One way to solve this is to process each record sequentially and unify the output only at the end. However, this can be extremely slow, depending on the time spent processing each record. Another way is to process them concurrently, speeding up the overall time. In my post about introduction to concurrency, I talked a bit about goroutines and channels. Now, I’ve decided to talk about waitgroups, a way to simplify the management of multiple goroutines.

Comments

alert-triangle
You must log in or register to comment.

Hacker News

hackernews

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !hackernews@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

Posts from the RSS Feed of HackerNews.

The feed sometimes contains ads and posts that have been removed by the mod team at HN.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 295 users / day
  • 1.26K users / week
  • 3.99K users / month
  • 9.51K users / 6 months
  • 2 local subscribers
  • 2.43K subscribers
  • 29.4K Posts
  • 11.7K Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org