The ugly part of Alertable IO is that you will always read (at least) one byte that you can't easily stuff back.
For files, it essentially mean buffering the input within the application. Select for unix must do the same thing, though the buffering is probably done by the OS rather than in user space. For files, 'put back' simply means a negative seek.
For pipes, the data has to have been received and therefore buffered before any OS can tell it it can read. PeekNamedPipe() just allows to to find out how much (and what, but that's by the by) has been received and buffered.
In reply to Re^5: [Win32] IO::Select's can_read method
by BrowserUk
in thread [Win32] IO::Select's can_read method
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |