CodePudding user response:
Multi-line suggested that lockCodePudding user response:
For a single generation, consumers, and it is thread-safe, do not need to be lockedCodePudding user response:
Individual producers and consumers, should also lock, mainly is the read-write lockCodePudding user response:
toCodePudding user response:
If you are unsure, then add better than without.