Parallelize tests (#17)
* Store a reference to libusb implementation in the context, transfers and some more places. Remove the global libusb variable. * Parallelize tests. * Fix the link in README.
This commit is contained in:
@@ -89,7 +89,7 @@ func (i *Interface) Close() {
|
||||
if i.config == nil {
|
||||
return
|
||||
}
|
||||
libusb.release(i.config.dev.handle, uint8(i.Setting.Number))
|
||||
i.config.dev.ctx.libusb.release(i.config.dev.handle, uint8(i.Setting.Number))
|
||||
i.config.mu.Lock()
|
||||
defer i.config.mu.Unlock()
|
||||
delete(i.config.claimed, i.Setting.Number)
|
||||
@@ -106,6 +106,7 @@ func (i *Interface) openEndpoint(epAddr EndpointAddress) (*endpoint, error) {
|
||||
InterfaceSetting: i.Setting,
|
||||
Desc: ep,
|
||||
h: i.config.dev.handle,
|
||||
ctx: i.config.dev.ctx,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user