10-09-2009 04:09 PM
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??
Valued Contributor II
10-11-2009 10:29 AM
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.