Getting Squeak to stop hanging on file I/O (and to start blocking threads on serial)?

Martin McClure martin at hand2mouse.com
Sat Apr 13 16:52:37 UTC 2002


At 9:41 AM -0700 4/12/02, Ned Konz wrote:
>[...]Now that we have the sqaio support for sockets, why aren't we using it
>for regular file handles and for serial I/O?
>[...]
>And the serial port support was written to be explicitly non-blocking,
>forcing us to poll (which is pretty ugly).

Yes, I'd like to see polling replaced with events whenever reasonable.

>
>My problem with fixing this is that it would affect the FilePlugin and
>the SerialPlugin, and would change the API of the SerialPlugin. Which
>would affect everyone using it.

[...]

>An alternative, of course, would be to come up with a NewSerialPlugin
>and a NewFilePlugin that do the right thing.
>

That sounds like a good incremental strategy: Implement the new 
alongside the old, give everyone some time to migrate to the new way, 
then abandon support for the old way. The difficult part is deciding 
how long to keep support for the old way.

Also, I'd suggest using more descriptive names than "NewWhatever." 
Maybe "EventsSerialPlugin" or "AsynchSerialPlugin," something that 
identifies what changed between it and "SerialPlugin."

-Martin



More information about the Squeak-dev mailing list