Home > Software engineering >  Boost: : circular_buffer without locking
Boost: : circular_buffer without locking

Time:09-27

A producer and a consumer, the data don't need to deal with, each more than full can override, this kind of situation with boost: : circular_buffer need lock?

CodePudding user response:

Multi-line suggested that lock

CodePudding user response:

For a single generation, consumers, and it is thread-safe, do not need to be locked

CodePudding user response:

Individual producers and consumers, should also lock, mainly is the read-write lock

CodePudding user response:

to

CodePudding user response:

If you are unsure, then add better than without.
  • Related