[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Adding an API hook to enable a select extension

From: Andrew J. Schorr
Subject: Re: [bug-gawk] Adding an API hook to enable a select extension
Date: Fri, 31 May 2013 11:14:39 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, May 31, 2013 at 06:04:59PM +0300, Eli Zaretskii wrote:
> Gawk is about reading input and writing output.  The question we
> should be asking ourselves is "why would a Gawk program want to call a
> function like 'select' or 'poll'?"  It certainly will have some
> relation to either reading or writing (or both).

That's pretty much inherent in the nature of select.  It allows you
to determine when file descriptors are ready for reading or writing...

> I would suggest then
> to try to integrate 'select' into Gawk I/O functionality somehow,
> either through 'getline' or through some redirection operator.

Select is also required for implementing GUI libraries where asynchronous
callback mechanisms are required.    In such a case, getline may not
be appropriate.

I am simply proposing to add one API function to enable extensions
to offer I/O multiplexing features.  If you'd like to change the core
gawk language, that's a much bigger discussion.  Do you have a 
specific proposal?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]