Re: GNAT sockets question
Samuel Tardieu <[email protected]> Wed, 31 Dec 2003 17:04:19 +0100
| Newsgroups | gmane.comp.lang.ada.sockets |
|---|---|
| Organization | Avian Carrier & Friends |
| Message-ID | <[email protected]> |
>>>>> "Duncan" == Duncan Sands <[email protected]> writes: Duncan> Hi Samuel, I know I shouldn't be asking this question here, I Duncan> hope you don't mind. I notice that if you use the stream read Duncan> and write functions in GNAT.Sockets on a socket that uses Duncan> non-blocking I/O, then typically the processor goes into a Duncan> busy loop (99% of CPU). The reason is that the implementation Duncan> just keeps looping around trying to send (receive) any Duncan> remaining bytes, and if the socket is full (empty) then it Duncan> sends (receives) zero bytes, causing it to immediately loop Duncan> around again... Is there any good reason for this Duncan> implementation? Shouldn't it be using select? I really can't understand questions concerning GNAT.Sockets as I don't use it. Sam -- Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/sam _______________________________________________ AdaSockets mailing list [email protected] http://www.rfc1149.net/mailman/listinfo/adasockets