-
Notifications
You must be signed in to change notification settings - Fork 458
Description
Right now, you can use hid_read to wait for something to be available or hid_read_timeout to limit how long you want to read. While sticking to single-threaded code when interacting with the library (as you might want to do in certain languages or due to thread-safety not being explicitly defined for the multiple implementations behind the library), this forces you to choose the resolution at which you want to be able to react to requests to write due to e.g. user requests as a balance between that reaction time and constantly waking up from waiting on the device needlessly.
Ideally I think there would be some descriptor I can pass to select or poll so it can sleep until one of several things happen so the code can react to
If the library however is meant to be thread-safe and I should be able to read and write on different threads concurrently, then that's something that really should be made explicit in the documenation. I haven't found anything about threads in the README or the header save for a note in hid_init().
Metadata
Metadata
Assignees
Labels
Type
Projects
Status