You could use the atomic package and forego the lock. You can also have a go routine with a channel that receives the counter messages. No need for a lock there.
But use it if you really need it. Likely that’s not your bottleneck.
But use it if you really need it. Likely that’s not your bottleneck.
No comments yet.