Stepping question..

Bijan Parsia bparsia at email.unc.edu
Mon Sep 25 03:10:20 UTC 2000


You might try examining the IRCConnection and TelnetMachine classes, in
particular the #processIO method. They both use stepping to moniter a
socket.

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.

Cheers,
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 mailing list