Simplified concurrency mechanisms for goroutines
Simplified concurrency mechanisms for goroutines

It does not longer make sense to have a mutex and cancelled context check
since we have a wait group and channels with buffers with the size equal
the number of workers.

Without the wait group we had to make sure no goroutine tries to write
to the closed channel. Now, channel is closed after all goroutines
completed (either by finding prime or cancelling the work), so there is
no chance someone tries to write to closed channel.

didiercrunch/paillier