[racket-dev] need help with pr-13350: readline busy polling vs callback fix?

From: Danny Yoo (dyoo at hashcollision.org)
Date: Fri Feb 8 21:06:33 EST 2013

I'm trying to attack PR-13350, which is the busy-polling bug involving readline.


The closest I've got so far is:

    https://github.com/dyoo/racket/tree/pr-13350


When I run the small test program:

#######
$ cat test.rkt
#lang racket/base
(require readline/mzrl)
(list (readline-bytes #">>> ")
      (readline "... "))
#######



Everything is happy: CPU usage is close to zero, and the program
appears to do the right thing:

#######
$ ~/local/racket/bin/racket test.rkt
>>> hello
... world
'(#"hello" "world")
#######


However, when I try using this in the larger context of xrepl, I've
found that I've completely broken it.

#######
$ ~/local/racket/bin/racket
Welcome to Racket v5.3.3.1.
> (require xrepl)
-> hello
-> world
-> help
#######


where the repl isn't paying attention at all.  There is something
crucial that I don't understand, but I've stared at this too long.
I'm completely baffled at the moment.

Posted on the dev mailing list.