Telnetting into Squeeek.

Lex Spoon lex at cc.gatech.edu
Wed Jun 25 11:27:47 UTC 2003


"David T. Lewis" <lewis at mail.msen.com> wrote:
> On Tue, Jun 24, 2003 at 09:20:53PM -0700, Alan Grimes wrote:


> > 
> > 1. Because the current squaek system is single-threaded, it will need to
> > block and sit on the read(); call or poll it... neither solution is
> > especially great... 
> 
> This is not as bad as it seems. You have to avoid blocking the VM on
> an external IO operation, but it turns out that this can be handled
> (at least on some platforms) with the "aio" event mechanism in Ian's VM,
> combined with some primitive support to forward IO events to the
> Squeak VM (the primitives are in the currently released OSProcess
> plugin, but image-side support is stuck in the aforementioned stuff
> that won't yet pass my SUnit tests).


What do you mean, David?  Look at methods like waitForDataUntil:, and
you can see code that waits on a signal from the VM.  On Unix, at least,
that signal comes from the aio module, which in turn uses Unix's
select(2).  This functionality seems to be available from the image, if
you want it.  Does OSProcess have its own sockets interface?

I disagree that you need to use this kind of thing, though.  Polling is
fine for a telnet server: just pick a polling interval of 100 times per
second, and the user won't notice the lag and the CPU load will be
extremely low.

Lex



More information about the Squeak-dev mailing list