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

Question on QTUsb usage with HID device and threading #95

Open
RonanKennelly16 opened this issue Oct 2, 2023 · 0 comments
Open

Question on QTUsb usage with HID device and threading #95

RonanKennelly16 opened this issue Oct 2, 2023 · 0 comments

Comments

@RonanKennelly16
Copy link

Hi,

I'd like to use this project is a threaded application and receive events to unblock thread waits (e.g. data received on a blocking read() ) rather than polling. Is it possible to use QtUsb in this way?
I compiled the project with Qt6 and qmake and it is working as expected with the examples provided. I'd now like to run two threads (one send/one receive) and share the QHidDevice pointer with mutex protection.
Ideally the read() would run in blocking mode with the ability to process a USB receive event to unblock it. It seems that it can only run with a timeout at the moment to allow any write() call to proceed, but I have just started experimenting.
Thank you for any details you can provide

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