[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Geiser-users] [BUG] Printing with a newline from another thread los
Jose A. Ortega Ruiz
Re: [Geiser-users] [BUG] Printing with a newline from another thread loses the REPL running Racket
Thu, 28 Mar 2013 18:28:35 +0100
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
On Thu, Mar 28 2013, Diogo F. S. Ramos wrote:
> 1. Run M-x run-racket
> 2. Input `(thread (thunk (displayln "hello, world")))' to the REPL
> After 2., the REPL is in a state where it can't take input anymore.
> It's also impossible to enter files using C-c C-a.
This is (known) limitation of Geiser: communications between Emacs and
Racket, when running the later from within Emacs, is mediated by stdin,
and spawning threads interfere with that communication.
The way to use threads and Racket (or Guile, for that matter) is to
start a separate process and connect to it using M-x geiser-connect
(since then Geiser and Racket will talk using a socket).
> The Racket process is still running because it's possible to evaluate
> expressions using C-x C-e in other Geiser Racket buffers.
> Using `display' instead of `displayln' does not reproduce this behavior.
Sometimes it's possible to avoid these deadlocks by setting
geiser-repl-read-only-prompt-p, but it's more of a workaround.