Bug in std.socket
Graham St Jack
graham.stjack at internode.on.net
Wed Apr 15 15:51:39 PDT 2009
On Wed, 15 Apr 2009 09:35:45 -0700, Brad Roberts wrote:
> Graham St Jack wrote:
>> On Wed, 15 Apr 2009 00:38:33 -0700, Unknown W. Brackets wrote:
>>
>>> Does waiting for a keypress in the client thread do you any favors?
>>>
>>> Also, you can get some mileage by doing a select() (see SocketSet) on
>>> the socket first. This will tell you if you need to accept(), and
>>> also allow you to do timeouts. I'm a big fan of non-blocking sockets,
>>> you can improve connect() this way too.
>>>
>>> -[Unknown]
>>>
>>>
>> Thanks for all the useful suggestions. I'm on the ticket bandwagon at
>> last.
>>
>> I realise that the code I posted was a bit rough (although I missed the
>> race, which is definitely there). It was a heavily cut-down version of
>> something a lot larger that does indeed use select, uses non-blocking
>> I/ O, retries connection attempts, and even uses Fibers. What I wanted
>> was a small and simple test case to attach to the ticket, not something
>> serious.
>
> I was about to close the ticket as invalid due to buggy reproduction
> code. Can you demonstrate the problem with an example app that's _not_
> buggy? If so, please attach it to the bug report.
>
> Later,
> Brad
Someone else already provided a much simpler test case without bugs.
More information about the Digitalmars-d
mailing list