[plt-scheme] mred in console mode on Debian

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Apr 13 11:33:38 EDT 2008

On Apr 13, Robby Findler wrote:
> Your REPL thread and the thread that handles GUI events are one and
> the same thread. This means you're blocking the handling of events
> by the "read" that is sitting waiting for input in the REPL.
> 
> You should be able to see this by evaluating (yield) a few times in
> the REPL to handle the queue'd up events.

Another solution is to create the frame in a new eventspace (which
implies a new thread for the gui events):

(define frame (parameterize ([current-eventspace (make-eventspace)])
                (instantiate frame% ("Example"))))
(define msg (instantiate message% ("Hello World!" frame)))
(send frame show #t)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.