-
Notifications
You must be signed in to change notification settings - Fork 447
Description
Since IOHIDDeviceSetReport apparently blocks until the report has made it through, it seems that when you have for example a couple HID devices connected via bluetooth and the system can't keep up with the traffic, hid_write stops at IOHIDDeviceSetReport causing the application to hang (and the HID device whose report got stalled to become unresponsive until disconnected/reconnected).
Googling around seems to indicate that the asynchronous sibling (?) IOHIDDeviceSetReportWithCallback was for some reason never implemented by Apple, so I fear there is not much to be done...
on the other hand, I suppose if one could only move IOHIDDeviceSetReport to a different thread, then the main thread could be kept from becoming unresponsive, which while not ideal would be at least a big improvement.
I have been attempting various solutions to this problem, but my experience with threading is close to zero, so any advice would be greatly appreciated. (I am running macOS 12, by the way)