Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Have sent a PR handling all the wrinkles: https://github.com/soroushjp/go-parallelism-monte-carlo-demo...

* There is a race condition where wg.Wait() might execute before the wg.Add(1) runs * The wait group was not necessary as we are already waiting for all the results from the channel



Thanks again, very helpful and updated all relevant code in the post also.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: