Home > Back-end >  In the case of only add elements to queue query (. IsEmpty) need for locks?
In the case of only add elements to queue query (. IsEmpty) need for locks?

Time:01-23

A queue is a thread to it in the case of only add elements of the operation, another thread just query (. IsEmpty) the queue is not empty, need not to need for the lock?

CodePudding user response:

See you in the thread safe queue or not the thread safe queue, if is a thread safe queue, will be locked
  • Related