libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Remove PlibC from autotools files


From: LRN
Subject: Re: [libmicrohttpd] Remove PlibC from autotools files
Date: Fri, 09 Aug 2013 00:09:05 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Thunderbird/25.0a1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08.08.2013 22:50, Michael Cronenworth wrote:
> On 08/08/2013 01:15 PM, LRN wrote:
>> What if timeout is set not to 5 seconds, but more... ? Now you get the idea.
> 
> Please do not insult me. (I took this as one)
It was not intended as one.

> PlibC does the same operation but wakes up 1/10th a second no matter what your
> timeout is set to.
Yes, and because it alternates between select() and pipe checking every
100ms, it won't lag for unforseeable amount of time. That (alternating)
is what your code does in most cases too - except for the one that i've
outlined.
Note that IMO this 100ms alternation is just awful - but it's the only
way to make this work with the inflexible tools that we've been given
(W32 API), without resorting to threads (like we did in GNUnet).

> 
> If you want to bring in an entire library for something that could take a 
> dozen
> lines of code then I can't stop you.
I don't want, but that's how things came to be (before i even knew what
"MHD" or "plibc" are). It's you who is changing things (things that
worked so far), not me.
And it's not dozen lines of code. Just out of curiosity, take a glance
at GNUNET_NETWORK_socket_select(). MHD can make do with less code than
that, but only because it mostly uses sockets, and uses pipes only for
one specific thing in known circumstances. But still...And Grothoff
doesn't like the use of threads, so it'll be like the old version of
GNUNET_NETWORK_socket_select() - with some really complex event voodoo.

The only reason why i'm not telling you to go and make yourself useful
somewhere else, is because plibc IS a bad library (in its current state;
and i have a nagging suspicion that it's beyond redemption), and
replacing it with custom code IS (potentially) good. But not if that
code is inferior or doesn't cover all corner cases.

> 
> I wish you guys the best of luck. A rotten experience on my end.
Note that your code can be "improved" (that is, brought to the same
level of brokennes that plibc is on) by handling the case that i've
mentioned in appropriate manner. Remember the looping with gotos that
you've had? You would have had to reinstate it in some form, but only
for cases where may_block is MHD_YES. Basically, copy the plibc select()
code, with some major simplifications.
With that i would have said "ok, i don't like this, but ditching plibc
is kind of neat, and this code isn't worse than what plibc does" and
blessed it for committing.

You sure you want to just give up on this?

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSA/rhAAoJEOs4Jb6SI2Cwe/IIAIb2oS+Oan+Dk9J/j/EVGpxL
dzmGFxuHr1bkdhnEEp1pcPQdjOxcyBRSfYYQK06x3QW7uEQzQ6onlcvRKLv7bC6n
dRwCDGMzEo/fg8kk1ICbQLTTsg2pF4ZwiQDKmEtTlMuASxywaDxks7v5Qrk+clrt
vfmgc4yIMkqsXyrM6K3vf4s8M6EZGXnq8oO+5XI/3Y7FrLcrh6092qzse+lBwyzN
QTRwS36ZdzTVTwBwQj8Ha30pC9YhgrRMLD+i4TwEC465jVjDze+rnscvTpMBQzsy
JwCSzAN85WgWF4a1nFBAXRvwYoYnZ1npjs61uui0aVRK4uYORq1oxmU5HiXG/F4=
=Bqqw
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]