Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

monitors category??

praveen_satishgmail_
127 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??
0 Kudos
1 Reply
robert-reed
Valued Contributor II
127 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.
Reply