Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003075OCamlOCaml generalpublic2004-08-18 13:332004-08-20 16:49
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003075: Feature request: "select" on channels
DescriptionHi,

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

TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0003579acknowledged "select" on Pervasives.in_channel 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2009-08-20 14:33 xclerc Relationship added has duplicate 0003579


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker