Quantcast
Channel: Why does my go code hang whilst using goroutine and channels? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Schwern for Why does my go code hang whilst using goroutine and...

The way you're using channels and WaitGroups is fragile. Channels should not need to completely buffer their contents; you don't know how large listOfAccounts is and if it's larger than the buffer...

View Article


Answer by user13631587 for Why does my go code hang whilst using goroutine...

Because the program stuffs the channel before the workers start, the program will hang when len(listOfAccounts) is greater than cap(jobsChannel). Fix by starting the workers first.Another issue is that...

View Article


Why does my go code hang whilst using goroutine and channels?

So I am wanting to make mutiple http request to an api endpoint I need to do give or take 15 thousand now I am wanting to make these requests as fast as possible but whilst also not running into any os...

View Article
Browsing latest articles
Browse All 3 View Live


Latest Images