unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: sds@gnu.org, fx@gnu.org, wmperry@aventail.com, emacs-devel@gnu.org
Subject: Re: url.el blocks Gnus+nnrss
Date: Tue, 25 Jan 2005 11:51:05 -0500	[thread overview]
Message-ID: <jwvu0p5o4by.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m38y6hinq1.fsf@P131831.SAP.Corp> (Klaus Straubinger's message of "Tue, 25 Jan 2005 15:32:06 +0100 (CET)")

> For me the patch provided a big improvement, but I still observed hangs -
> as far as I could determine, always in connections without specified
> Content-Length. I think the reason for this is that in these cases
> url-http-simple-after-change-function is used which does not call the
> callback function at the end, as opposed to
> url-http-content-length-after-change-function. This leads to a hang in
> accept-process-output when the connection already has been closed.

OT1H, looking at the docstring of url-retrieve, I'd think that it's a bug in
url-http.el that it sometimes fails to activate the callback.

But, OTHO, looking at the url-http.el code it seems that it purposefully
only activates the callback when the retrieval was successful.

If someone could explain to me which it is, that would help.

I guess what should really happen is that the callback is always activated
but is given an extra argument (explicit or implicit) so it can tell whether
the retrieval was successful.

In any case, it might very well be that your problem is no related to all
this but is a much more down to earth bug.

To debug it, could you try to replace the (setq retrieval-done t) in your
patch with (debug).
Also do (setq url-debug '(http)).
When the debugger gets called, take a look at the *URL-DEBUG* buffer (and
send it here).

> @@ -176,7 +176,7 @@
>  	  ;; similar that takes processing completely outside of the URL
>  	  ;; package.
>  	  nil
> -	(while (not retrieval-done)
> +	(while (null retrieval-done)
>  	  (url-debug 'retrieval
>  		     "Spinning in url-retrieve-synchronously: %S (%S)"
>  		     retrieval-done asynch-buffer)

not and null are synonyms.  When to use which is a question of taste, but
I tend to use `not' when applied to something that I consider as a boolean
value, whereas I tend to use `null' when applied to something that can be
nil or anything else (a list, for example).
So in the above case, I think `not' is preferable.


        Stefan

  reply	other threads:[~2005-01-25 16:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 12:16 url.el blocks Gnus+nnrss Katsumi Yamaoka
2005-01-13 14:35 ` Stefan Monnier
2005-01-13 22:39   ` Katsumi Yamaoka
2005-01-25 14:32   ` Klaus Straubinger
2005-01-25 16:51     ` Stefan Monnier [this message]
2005-01-26 15:02       ` Klaus Straubinger
2005-01-28 16:58         ` Stefan Monnier
2005-02-01  9:35           ` Klaus Straubinger
2005-01-28 23:16       ` Dave Love
2005-01-29 16:21         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvu0p5o4by.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=fx@gnu.org \
    --cc=sds@gnu.org \
    --cc=wmperry@aventail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).