libusb
libusb copied to clipboard
darwin: fix race condition on device capture
If two threads try to capture at the same time, the result can be inconsistent. For example, a process can have two different contexts to libusb and both call libusb_reset_device.
I wonder if this fixes https://github.com/libusb/libusb/issues/1635 I'll check in a bit
@osy BTW you may be interested in https://github.com/libusb/libusb/pull/1419
In fact I think I'll revive that effort, we could probably get some of it in first...
@osy
Would you please address the comments from @seanm? Thanks.