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:
@@ -17,7 +17,7 @@ package gousb
|
||||
func (e *endpoint) newStream(size, count int, submit bool) (*stream, error) {
|
||||
var ts []transferIntf
|
||||
for i := 0; i < count; i++ {
|
||||
t, err := newUSBTransfer(e.h, &e.Desc, size, e.Timeout)
|
||||
t, err := newUSBTransfer(e.ctx, e.h, &e.Desc, size, e.Timeout)
|
||||
if err != nil {
|
||||
for _, t := range ts {
|
||||
t.free()
|
||||
|
Reference in New Issue
Block a user