Less that 1 GB... that's impressive! Now I'm wondering how much memory Go or Java would require.
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/