GNAT sockets question

Duncan Sands <[email protected]> Wed, 31 Dec 2003 15:16:27 +0100
Newsgroups gmane.comp.lang.ada.sockets
Message-ID <[email protected]>
Hi Samuel, I know I shouldn't be asking this question here,
I hope you don't mind.  I notice that if you use the stream read
and write functions in GNAT.Sockets on a socket that uses
non-blocking I/O, then typically the processor goes into a busy
loop (99% of CPU).  The reason is that the implementation just
keeps looping around trying to send (receive) any remaining
bytes, and if the socket is full (empty) then it sends (receives)
zero bytes, causing it to immediately loop around again...
Is there any good reason for this implementation?  Shouldn't
it be using select?

Thanks,

Duncan.
_______________________________________________
AdaSockets mailing list
[email protected]
http://www.rfc1149.net/mailman/listinfo/adasockets