
Episode 13
013: Go's concurrency to the rescue
Real-world story about how Go's concurrency save a .NET performance issue I was having where I needed to call a process that takes 5 to 15 seconds to complete 6m times.
November 30, 202214m 54s
Audio is streamed directly from the publisher (media.transistor.fm) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
Go's worker queue pattern:
type WorderPool struct {
queue chan int
}
func (wp *WorkerPool) start() {
for i := 0; i < 500; i++ {
go funcIO {
for id := range wp.queue {
doSomething(id)
}
}()
}
}
func (wp *WorkerPool) add(id int) {
wp.queue <- id
}
Best way to show support for the pod is by sharing it around and buying my course.
Topics
gogolangprogrammingcodedeveloper