From: John Carter Date: 2002-05-16T08:12:54+09:00 Subject: Re: Thread, stacktraces, errors and expect. On Thu, 16 May 2002, Paul Brannan wrote: > On Thu, May 16, 2002 at 07:05:27AM +0900, John Carter wrote: > > I'm busy rewriting expect.rb to handle things in bigger chunks. I'm > > Which expect.rb is it that you are rewriting? The one in /usr/local/lib/ruby/1.6/expect.rb (If you speak unix...) Is there another? > > using it on a slow '486 driving 7 different hardware things lurking at the > > end of 7 serial ports. I'm rewriting expect to use one Thread, and a > > single select for all ports and sysread instead of getch. > > In Ruby, when multiple threads are waiting on IO, the interpreter makes > a single call to select() internally. I'm not sure if there will be > much of a performance benefit in single thread/one select over multiple > threads. I'm not sure either. I noticed that when I was debugging something, but was fairly far along this path. I'll probably try both and benchmark. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand May contain traces of nuts. This email was packed by mass, not volume. Contents may have settled during distribution. This email is not designed or intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. Reader represents and warrants that it will not use or redistribute the email for such purposes.