USB devices are unable to distinguish requests from multiple sources so operating systems only allow an interface to have a single owning user-space or kernel-space driver. In WebUSB, the UA acts as a user-space driver and only allows a single JavaScript execution context to claim an interface at a time. Therefore, it shouldn't be possible for multiple workers to access the same USB device concurrently.
I think this ought to be explained in the specification, perhaps with reference to the exact APIs that will fail when this situation occurs.
I got here from w3ctag/design-reviews#277, and this comment relates to the changes made in #130.
It seems to me that there ought to be a little bit more explanation in the spec of how it handles multiple threads trying to interact with the same USB device. In https://github.com/w3ctag/design-reviews/issues/277#issuecomment-386046603 @odejesush wrote:
I think this ought to be explained in the specification, perhaps with reference to the exact APIs that will fail when this situation occurs.