banner
sora

sora

编程心得 & 人文感悟

Is the `sk_acceptq_is_full` function wrong?

Scrolling up on Twitter to @01mlsx's blog, I plan to study it and came across this paragraph:

image

The size of the full connection queue = configuration number + 1. The reason is that even if it is configured as 0, it can still ensure that there is at least one connection.

The twists behind the comments#

With great interest, I looked through the commits, and it all started with a commit from 2007

image

Four days later, the maintainer who merged the branch discovered the issue and reverted the changes made in this commit

image

In 2021, another developer wanted to "correct" the "error" in sk_acceptq_is_full

image

Half a month later, a developer using a Google internal email reverted this change and added a long comment

image

Reflection#

Sometimes, what we perceive as a mistake may actually be something the designer considered that we didn't. So, it's important to approach learning with an open mind rather than hastily assuming it's an error.

Side note#

When I directly searched for this comment, Google gave me these results:

image

While the new Bing gave me these results:

image

It seems like Google is facing some significant competition pressure this time.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.