Skip to Content
Computer Vision with OpenCV 3 and Qt5
book

Computer Vision with OpenCV 3 and Qt5

by Amin Ahmadi Tazehkandi
January 2018
Intermediate to advanced content levelIntermediate to advanced
486 pages
11h 28m
English
Packt Publishing
Content preview from Computer Vision with OpenCV 3 and Qt5

Semaphores

Sometimes, in multithreaded programming, we need to make sure multiple threads can access a limited number of identical resources accordingly. For instance, a device that will be used to run a program might have a very limited amount of memory on it, so we would prefer that our threads that need an extensive amount of memory take this fact into account and act based on the available amount of memory. This and similar issues in multithreaded programming are usually taken care of by using semaphores. A semaphore is similar to an enhanced mutex, which is not only capable of locking and unlocking, but also keeping track of the number of available resources.

The Qt framework provides a class called QSemaphore (conveniently enough) to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering OpenCV 4 - Third Edition

Mastering OpenCV 4 - Third Edition

Roy Shilkrot, David Millán Escrivá
Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres
OpenCV 4 with Python Blueprints - Second Edition

OpenCV 4 with Python Blueprints - Second Edition

Dr. Menua Gevorgyan, Michael Beyeler (USD), Arsen Mamikonyan, Michael Beyeler

Publisher Resources

ISBN: 9781788472395Supplemental Content