[squeak-dev] XTream timings

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Dec 4 18:45:56 UTC 2009


2009/12/4 David T. Lewis <lewis at mail.msen.com>:
> On Fri, Dec 04, 2009 at 11:58:28AM -0500, Jason Rogers wrote:
>> Would it be possible to have Xtreams on STDIN, STDOUT, STDERR? Of
>> would that require use of OSProcess?
>
> On most unix boxes you should be able to use /dev/stdout as if it
> were a file, thus OSProcess should not be necessary. You'll need
> OSProcess if you want to set stdin for non-blocking reads to prevent
> blocking the VM.
>
> Dave
>
>
>

Yes, it would be good to integrate async IO in Xtream, but later.

I thought adopting following protocol in Xtream for the core IO operations:

#readInto:startingAt:count: and #writeFrom:startingAt:count: are for
non blocking IO and answer the number of items read/written.
#next:into:startingAt: and #next:putAll:startingAt: are for blocking IO

For sure, there will be a little more work required if we want to
duplicate the whole protocol
#peek #next #next: #next:into: etc...
For now, I don't think it is necessary, especially if Eliot provide a
threaded VM to handle these blocking IO in a background native
thread...

Nicolas



More information about the Squeak-dev mailing list