This is a 2+ year old thread, but I believe my response back then was to use asyncSubmit instead of syncSubmit.
It may be a bug if abortAllSubmissions() doesn't wake up a pending syncSubmit(), but I do not own this project anymore, Brian W does, he is also on this mailing list so he may be able to provide more info. On Sun, Feb 3, 2013 at 5:55 AM, Hardik Shah <hardik.s...@jetmobile.com> wrote: > Klaus Gradinger <klaus.gradinger <at> gmail.com> writes: > >> Hello, I've been running into the following Problem: I'm communicating using >> a > USB Handheld Barcode Scanner (USB HID Keyboard Device). Everything is fine, > i've > opened the IN Endpoint using the UsbPipe and access it the following way: > currentDui = new DefaultUsbIrp(buffer); currentDui = new > DefaultUsbIrp(buffer); currentDui.setAcceptShortPacket(true); > usbScannerPipe.syncSubmit(currentDui);I receive the data i'm expecting and > everything works fine UNTIL i want to abort and cancel everything: > usbScannerPipe.abortAllSubmissions(); usbScannerPipe.close(); > usbScannerPipe = > null; usbScannerInterface.release(); usbScannerInterface = null;The problem > is > that syncSubmit immediately synchronizes using "submitLock" (UsbPipeImp). > After > that the whole thing just keeps blocking while waiting for data. When i call > abortAllSubmissions from another Thread, it too locks on "submitLock", waiting > for the submitSync method to release this lock. IF i scan another Barcode, the > syncSubmit method returns and everything is fine, otherwise it's a perfect > deadlock.What's the correct work-flow here? how can i cancel everything > pending > and close the pipe and interface?i'm using Ubuntu 10.04, and java-usb > 1.0.1Thanks in advanceKlaus Gradinger >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> >> _______________________________________________ >> javax-usb-devel mailing list >> javax-usb-devel <at> lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel >> > > Hello, > > I am facing exactly the same problem. Are you able to resolve the problem you > mentioned. if yes please let me know the steps.. > > Many thanks > > Shah > > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > javax-usb-devel mailing list > javax-usb-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/javax-usb-devel ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel