Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect operation in multithreaded code #256

Open
Omeon opened this issue May 26, 2023 · 0 comments
Open

incorrect operation in multithreaded code #256

Omeon opened this issue May 26, 2023 · 0 comments

Comments

@Omeon
Copy link

Omeon commented May 26, 2023

Good day, please help me solve the following question.
I use zbar 0.23.92, Ubuntu 22.04 and C++11.
I am using a library for real-time barcode recognition. I am recognizing several images at once at the same time and for this I use several threads, in each of which I create a zbar::ImageScanner object.

But I noticed that this does not allow the scanner.scan(image) method to be performed at the same time. I took 2 images, noticed that in normal mode, each of them is recognized in 0.1 seconds. But when I create 2 streams and transmit one image to each, the first image is recognized in 0.1 seconds, and the second in 0.2 seconds. I think that during the recognition of the first image, the second stream cannot perform the scanner.scan(image) method.

Help in solving this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant