From e64c05f5506e25d99d3a68dcd35f0e398bbc4701 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 30 Jan 2008 07:50:32 +0000 Subject: [PATCH] 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. --- v7/src/edwin/editor.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.25.1