|
|
|
|
|
by hauleth
1104 days ago
|
|
It is in the original article [1], though I was made aware that Go implementation is also incorrect as `defer` in it make the memory usage to substantially raise. So instead of: defer wg.Done()
time.Sleep(10 * time.Second)
In original article it should be: time.Sleep(10 * time.Second)
wg.Done()
And memory usage will drop about 2x. I am no Go nor Java developer so I cannot say anything more.[1]: https://pkolaczk.github.io/memory-consumption-of-async/ |
|