From: Chris Hanson Date: Wed, 30 Jan 2008 07:50:32 +0000 (+0000) Subject: In INFERIOR-THREAD-OUTPUT!, signal one thread event, then no more X-Git-Tag: 20090517-FFI~373 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e64c05f5506e25d99d3a68dcd35f0e398bbc4701;p=mit-scheme.git In INFERIOR-THREAD-OUTPUT!, signal one thread event, then no more until after this batch of output is accepted. The previous behavior was causing significant delays when the inferior thread generated a lot of output. --- diff --git a/v7/src/edwin/editor.scm b/v7/src/edwin/editor.scm index bc85a96a8..f5e8d3065 100644 --- a/v7/src/edwin/editor.scm +++ b/v7/src/edwin/editor.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: editor.scm,v 1.264 2007/01/05 21:19:23 cph Exp $ +$Id: editor.scm,v 1.265 2008/01/30 07:50:32 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -600,10 +600,12 @@ TRANSCRIPT messages appear in transcript buffer, if it is enabled; (define (inferior-thread-output! flags) (without-interrupts (lambda () (inferior-thread-output!/unsafe flags)))) -(define-integrable (inferior-thread-output!/unsafe flags) +(define (inferior-thread-output!/unsafe flags) (set-car! flags #t) - (set! inferior-thread-changes? #t) - (signal-thread-event editor-thread #f)) + (if (not inferior-thread-changes?) + (begin + (set! inferior-thread-changes? #t) + (signal-thread-event editor-thread #f)))) (define (accept-thread-output) (with-interrupt-mask interrupt-mask/gc-ok