A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-November/030399.html below:

[Python-Dev] urllib performance issue on FreeBSD 4.x

[Python-Dev] urllib performance issue on FreeBSD 4.x [Python-Dev] urllib performance issue on FreeBSD 4.xMartin v. Loewis martin@v.loewis.de
24 Nov 2002 09:43:38 +0100
Andrew MacIntyre <andymac@bullseye.apana.org.au> writes:

> - why is the socket.fp being set to unbuffered?

I believe it prevents deadlocks. In HTTP/1.1, the server may not close
the connection, but may refuse to send more data until it receives the
next command. So you must be very careful to not read more data from
the socket than the protocol guarantees you to be present.

I believe stdio would not apply the necessary care: if it wants to
fill the buffer, it will block. It won't see EOF because there is
none, but there won't be any more data, because the server won't send
any until we send the next command. We won't send the next command,
since we are blocked.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4