You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3075 Reporter: administrator Assigned to:@alainfrisch Status: resolved (set by @alainfrisch on 2016-12-07T17:17:54Z) Resolution: suspended Priority: normal Severity: feature Category: standard library Has duplicate:#3579 Monitored by: mottl
Bug description
Hi,
I'd like to know whether there are plans to add "select" for I/O-channels
to the standard library.
It should behave as follows for in_channels: if there is data in the
buffer, return. If not, then perform a select with a given timeout on
the underlying descriptor.
For output channels: if the buffer is full, then perform a select with
a given timeout on the underlying descriptor, otherwise return.
There should also be an output function for out_channels that does not
block if data cannot be fully written to the descriptor. It could return
a tuple of the amount of bytes that were actually sent and the amount
of bytes of this data that were actually sent. This way an application
can notice that it should attempt sending further data/requests to a
different destination.
Btw., it would also be nice if one could specify (and query) the buffer
size for channels at runtime. The hard-coded IO_BUFFER_SIZE of 4096
may not be optimal for certain kinds of descriptors, e.g. sockets:
their send- and receive buffers may have other sizes.
Original bug ID: 3075
Reporter: administrator
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2016-12-07T17:17:54Z)
Resolution: suspended
Priority: normal
Severity: feature
Category: standard library
Has duplicate: #3579
Monitored by: mottl
Bug description
Hi,
I'd like to know whether there are plans to add "select" for I/O-channels
to the standard library.
It should behave as follows for in_channels: if there is data in the
buffer, return. If not, then perform a select with a given timeout on
the underlying descriptor.
For output channels: if the buffer is full, then perform a select with
a given timeout on the underlying descriptor, otherwise return.
There should also be an output function for out_channels that does not
block if data cannot be fully written to the descriptor. It could return
a tuple of the amount of bytes that were actually sent and the amount
of bytes of this data that were actually sent. This way an application
can notice that it should attempt sending further data/requests to a
different destination.
Btw., it would also be nice if one could specify (and query) the buffer
size for channels at runtime. The hard-coded IO_BUFFER_SIZE of 4096
may not be optimal for certain kinds of descriptors, e.g. sockets:
their send- and receive buffers may have other sizes.
Regards,
Markus
--
Markus Mottl http://www.oefai.at/~markus markus@oefai.at
The text was updated successfully, but these errors were encountered: