2014/1/2 Nicolas Göddel <nico...@freakscorner.de>: > Hi there, > > actually I am reading raw data from an usb endpoint with dev.read() in a > thread, > but it would be nicer to have a callback which will be called if data is > available. Is there a possibility to do so with PyUSB? > > And what about using two concurrent threads where one of them is used to write > data to an endpoint X and another is used to read consecutively from and other > endpoint Y? At the moment this is the scenario I work with. The two threads > are > using one Lock together and the reader uses one Condition to notify a third > thread if it has new data available writing it to the end of a list, which > acts > as a FIFO buffer. The main thread shows the GUI. >
I guess what you actually would like is asynchronous I/O support, which will probably come in the 1.1 version... -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users