From: Klaus Straubinger <KSNetz@Arcor.DE>
Subject: Re: url.el blocks Gnus+nnrss
Date: Tue, 25 Jan 2005 15:32:06 +0100 (CET) [thread overview]
Message-ID: <m38y6hinq1.fsf@P131831.SAP.Corp> (raw)
In-Reply-To: <87pt09v2m1.fsf-monnier+emacs@gnu.org>
> I've myself been using the patch below for a while now (it basically does
> the same as yours, except it hoists the get-buffer-process outside the loop
> and it removes the timeout since it shouldn't be needed now that Emacs knows
> what we're waiting for).
>
> I've just installed it.
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.
The following patch did help me, although I am not sure if it is the
right way to tackle the problem:
--- url.el.orig 2005-01-14 13:36:36.000000000 +0100
+++ url.el 2005-01-25 14:47:52.325350728 +0100
@@ -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)
@@ -185,11 +185,13 @@
;; interrupt it before it got a chance to handle process input.
;; `sleep-for' was tried but it lead to other forms of
;; hanging. --Stef
- (unless (accept-process-output proc)
- ;; accept-process-output returned nil, maybe because the process
- ;; exited (and may have been replaced with another).
- (setq proc (get-buffer-process asynch-buffer)))))
- asynch-buffer)))
+ (if (eq (process-status proc) 'closed)
+ (setq retrieval-done t)
+ (unless (accept-process-output proc)
+ ;; accept-process-output returned nil, maybe because the process
+ ;; exited (and may have been replaced with another).
+ (setq proc (get-buffer-process asynch-buffer)))))))
+ asynch-buffer))
(defun url-mm-callback (&rest ignored)
(let ((handle (mm-dissect-buffer t)))
--
Klaus Straubinger
next prev parent reply other threads:[~2005-01-25 14:32 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 [this message]
2005-01-25 16:51 ` Stefan Monnier
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=m38y6hinq1.fsf@P131831.SAP.Corp \
--to=ksnetz@arcor.de \
/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).