kgf at golden.net
Mon Sep 25 10:45:14 UTC 2000
> You might try examining the IRCConnection and TelnetMachine classes, in
> particular the #processIO method. They both use stepping to moniter a
Yes, this is where I originally got the idea of using step for such tasks. :)
> However, I don't think you'd want to use stepping to do low level io, for
> many reasons (including that stepping is tied, afaict, to the current
> project). Perhaps a peek at ConnectionQueue>>listenLoop would be more
> useful. The real key is to establish a Process of the right priority. You
> can use the (Delay forMilliseconds: 500) wait. idiom to get the timing
> right. You want to set the priority to be highIOPriority or lowIOPriority
> (see ProcessorScheduler).
> Hope this helps.
Thanks for the pointer, I'll take a look into the ConnectionQueue methods.
After some experimentation with my 'step'-based polling I can see why it
doesn't work so well for low-level I/O. :) I figured there had to be a
better way hidden somewhere... The Task class also looks to fit my needs
quite well too..
> Bijan Parsia.
> On Sun, 24 Sep 2000, Kevin Fisher wrote:
> > Hmm, interesting...yes, this might help me. I'm just writing a simple class
> > to poll the serial port every 500ms or so. I've been using the standard
> > SerialPort class, but I'm wondering if the 'flow' classes might be a better
> > solution? I've managed a roundabout way to poll the port using 'steps' right
> > now..quite different from what I've done in pure C in UNIX...
> > >
> > > Does this Task class help? SUnit test requires SUnit 2.6+. It is
> > > tricky to write to the Transcript from background processes, but John
> > > Chludzinski's recent fix will help you.
> > >
> > > Rob
> > [attachment snipped!]
More information about the Squeak-dev