Skip to content

Question on QTUsb usage with HID device and threading #95

Description

@RonanKennelly16

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions