On Mon, 11 Nov 2002, Dan Streetman wrote: > > >(seems as the packets are filled in the order sent out, but > >I get them back out of order sometimes). > > That is probably because your listener is taking a very long time to > process each event. The EventListenerHelper tries to get each event > to you as fast as it can, which means if you are still processing the > last packet it will start a new Thread to get the next one to you. > That's probably why you're getting out-of-order packets, and why there > are a lot of Threads being created (there was also a Thread problem > with the RunnableManager before 8/18/2002).
Don't think it takes very long, but probably long enough ;-) (Am just processing the data as YUV. However, changed to suing a list of Irps (which was basically what I had before with the composite irps. Works fine. Thanks). > I have known for a while the EventListenerHelper needs changing to be > more fair on a per-listener basis, currently it's on a per-event > basis. That is, a single Thread is used to deliver each event, and > the next Event gets a new Thread, if the old Thread is still in use. > That ensures that each event will get fired; but an earlier listener > may block later listeners. A more fair approach is one Thread per > listener, so that listeners can block themselves from getting later > events, but can't block others. Slightly more complicated to > implement but not too bad (basically just a Hashtable or map of the > current listeners, each one gets their own RunnableManager with an > unlimited max size). Yep, sounds right. //Roger ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ javax-usb-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/javax-usb-devel