Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
4 Views

monitors category??

do queuing_mutex and spin_mutex are categorized under monitors>>??and what is blocking synchronization..and if we want to do enqueue and dequeue elements in a queue parallel could it be possible by these mutexes??
0 Kudos
1 Reply
Highlighted
Valued Contributor II
4 Views

do queuing_mutex and spin_mutex are categorized under monitors>>??and what is blocking synchronization..and if we want to do enqueue and dequeue elements in a queue parallel could it be possible by these mutexes??

Yes both the queuing mutex and the spin mutex can be used to implement monitors ala Per Brinch Hansenand as such you could use them to write functions to enqueue and dequeue elements in parallel. Or you could just use the TBB concurrent_queue, which has the monitors built in to provide thread safe enqueue/dequeue functions.
0 Kudos