Re: Re: GNAT sockets question

Duncan Sands <[email protected]> Wed, 31 Dec 2003 17:33:10 +0100
Newsgroups gmane.comp.lang.ada.sockets
Message-ID <[email protected]>
On Wednesday 31 December 2003 17:04, Samuel Tardieu wrote:
> >>>>> "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.

I assumed you wrote it!  Sorry about that :)

Ciao,

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