Re: Making Event work for Win32

[email protected] (Nick Ing-Simmons)
Newsgroups perl.loop
Organization via, but not speaking for : Texas Instruments Ltd.
Message-ID <[email protected]>
Graham Barr <[email protected]> writes:
>On Tue, Mar 21, 2000 at 04:10:45PM +0000, Nick Ing-Simmons wrote:
>> But when Event says "handle is readable" how is perl code going to 
>> do its IO to read it?  - right now <$fh> or even sysread($fh,...)
>> call MS stdio to do that - which will fail if Handles are in async mode.

Just for the record the "async" mode I am talking about here is the 
callback style. When you do the read() equivalent you pass it a buffer
and a subroutine to call. It returns immediately with a "status" which 
say "operation initiated" or some such. Later when kernel has filled 
the buffer according to parameters you passed it calls the subroutine
passing the buffer and a context argument. This is elegant and efficient
and fits well with GUI style callback code but is very alien to UNIX 
read() semantics - so not surprisingly MS's C runtime does not work
if HANDLE is open in that mode.

-- 
Nick Ing-Simmons <[email protected]>
Via, but not speaking for: Texas Instruments Ltd.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.