From: Chris Hanson Date: Sat, 29 Sep 2001 03:00:13 +0000 (+0000) Subject: START-PROBE-FOLDER-THREAD is being called whenever a message is X-Git-Tag: 20090517-FFI~2538 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5470151df52a60c79a5623ec9afa6d5912fb1f17;p=mit-scheme.git START-PROBE-FOLDER-THREAD is being called whenever a message is selected, but unfortunately if there was already a thread, it was being killed and a new one started, which generated network traffic on an IMAP folder. Now it doesn't do anything if there is already a thread. --- diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index fe8faea54..6e307646a 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.273 2001/09/28 15:35:11 cph Exp $ +;;; $Id: imail-top.scm,v 1.274 2001/09/29 03:00:13 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -2241,17 +2241,19 @@ Negative argument means search in reverse." ;;;; Probe-folder thread (define (start-probe-folder-thread folder) - (stop-probe-folder-thread folder) - (without-interrupts - (lambda () - (let ((interval (ref-variable imail-update-interval #f))) - (if interval - (store-property! folder - 'PROBE-REGISTRATION - (start-standard-polling-thread - (* 1000 interval) - (probe-folder-output-processor - (weak-cons folder unspecific))))))))) + (if (not (get-property folder 'PROBE-REGISTRATION #f)) + (begin + (stop-probe-folder-thread folder) + (without-interrupts + (lambda () + (let ((interval (ref-variable imail-update-interval #f))) + (if interval + (store-property! folder + 'PROBE-REGISTRATION + (start-standard-polling-thread + (* 1000 interval) + (probe-folder-output-processor + (weak-cons folder unspecific))))))))))) (define ((probe-folder-output-processor folder)) (let ((folder (weak-car folder)))