Gnus development mailing list
 help / color / mirror / Atom feed
From: Sudish Joseph <sudish@mindspring.com>
Subject: Re: [ patch ] async stuff fix(?) (was Re: 0.3 and async pre-fetch)
Date: 04 Aug 1996 20:39:17 -0400	[thread overview]
Message-ID: <m2pw56u0ju.fsf@atreides.erehwon.org> (raw)
In-Reply-To: Sudish Joseph's message of 04 Aug 1996 18:09:51 -0400

More fixes.  These need to be applied over the last patch.

The first one is for a weird condition that I'm not sure of the cause
of.  The only explanation I can come up with is that the filter is
being called by XEmacs while the last filter is still active.  I
couldn't find anything in Lispref about this.  Anyone know how to
protect a few calls against this?  We don't need to stop it
altogether, the critical section is very small in the filter.  

The first patch below should make this safe -- unless the reentrant
call occurs before the 'insert is executed.  Making it safe in the
face of that takes some more thinking (don't define a filter and use
an after-change hook like Lars suggested?  or keep a variable that
tracks how many instances of the filter are active and accumulate the
o/p from the second and later calls in a string which is handled by
the first instance of the filter before it exits?)

The second one half-handles the case in the callback when it's arg is
nil (indicating that the buffer doesn't contain a valid article).  I'm
not sure of what to do here.  Note that the checking for error codes
in the filter isn't very robust in the face of filter race conditions
either.

-Sudish

Sun Aug  4 20:33:36 1996  Sudish Joseph  <sudish@mindspring.com>

	* gnus-async.el (gnus-async-prefetch-article): Check ARG before
 	assuming that the buffer contains an article.

	* nntp.el (nntp-process-filter): Insert all o/p at eob.


--- nntp.el~	Sun Aug  4 20:25:41 1996
+++ nntp.el	Sun Aug  4 20:25:41 1996
@@ -494,9 +494,9 @@
 	(let (point eoresponse b e)
 	  (set-buffer (process-buffer proc))
 	  ;; Insert string, moving the process-marker.
-	  (setq point (goto-char (process-mark proc)))
+	  (setq point (goto-char (set-marker (process-mark proc) (point-max))))
 	  (insert string)
-	  (set-marker (process-mark proc) (point))
+	  (set-marker (process-mark proc) (point-max))
 	  (if (and (= point (point-min))
 		   (string-match "^45" string))
 	      (progn

--- gnus-async.el~	Sun Aug  4 20:35:40 1996
+++ gnus-async.el	Sun Aug  4 20:35:40 1996
@@ -101,9 +101,10 @@
 		    (save-excursion
 		      (nnheader-set-temp-buffer
 		       gnus-async-prefetch-article-buffer t)
-		      (push (list ',(intern (format "%s-%d" group article))
-				  begin-marker end-marker ,group ,article)
-			    gnus-async-article-alist)
+		      (when (and arg begin-marker end-marker)
+			(push (list ',(intern (format "%s-%d" group article))
+				    begin-marker end-marker ,group ,article)
+			      gnus-async-article-alist))
 		      (when (gnus-buffer-live-p ,summary)
 			,(when next
 			   `(gnus-async-prefetch-article 


  reply	other threads:[~1996-08-05  0:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-01 23:41 0.3 and async pre-fetch Sudish Joseph
1996-08-02  1:31 ` 0.3 and async pre-fetch (and YA bug report) Raja R Harinath
1996-08-02 17:35 ` 0.3 and async pre-fetch Lars Magne Ingebrigtsen
1996-08-03  0:35   ` Sudish Joseph
1996-08-04 22:09     ` [ patch ] async stuff fix(?) (was Re: 0.3 and async pre-fetch) Sudish Joseph
1996-08-05  0:39       ` Sudish Joseph [this message]
1996-08-05 17:11       ` Lars Magne Ingebrigtsen
1996-08-06  6:08         ` Sudish Joseph
1996-08-06 20:51           ` Lars Magne Ingebrigtsen
1996-08-05 18:20       ` Ken Raeburn
1996-08-05 17:00     ` 0.3 and async pre-fetch Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=m2pw56u0ju.fsf@atreides.erehwon.org \
    --to=sudish@mindspring.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.
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 NNTP newsgroup(s).