Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout and abort irp #25

Open
akatopaz opened this issue Oct 9, 2013 · 3 comments
Open

Timeout and abort irp #25

akatopaz opened this issue Oct 9, 2013 · 3 comments

Comments

@akatopaz
Copy link

akatopaz commented Oct 9, 2013

Hi folks,
I'm a bit annoyed that I just can't abort irp when timeout has a big value (or you must may for all timeout to be exceeded, without speaking of the 0 case).

I think IRP model misses a irp.cancel() method.

What do you think ?
Though it might not be the right place to talk about this, I probably shall complain onto javax.usb project page ...
Cheers,
Topaz.

@kayahr
Copy link
Member

kayahr commented Mar 2, 2014

Currently the javax.usb implementation of usb4java uses synchronous transfers of libusb which can't be canceled because the thread is blocked by libusb. In future versions we should use asynchronous transfers which will be available in the low-level API of the upcoming 1.2.0 version. libusb provides a cancel function for asynchronous transfers so hopefully this will fix this issue. But unfortunately I can't tell you when this will be implemented.

@kayahr
Copy link
Member

kayahr commented Mar 15, 2014

One minor update: In 1.2.0 bulk-in and interrupt-in transfers will now block indefinitely without setting the timeout to 0 but still check for pipe-abortion after each timeout interval. So there should be no reason anymore to set the timeout to 0 and the blocked synchronous (and asynchronous) transfers will be aborted a few seconds after aborting the pipe (Timeout now defaults to 5 seconds).

@kayahr
Copy link
Member

kayahr commented Oct 21, 2018

Because of lack of time and knowledge I'm open for pull requests for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants