racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
447 stars 94 forks source link

Stop/Kill button does not work while printing something too long #444

Closed gus-massa closed 1 year ago

gus-massa commented 3 years ago

If you run this

(make-string 100000 #\A)

or

(expt 10 100000)

it takes too long to print.

While it is printing, if you click the Stop/Kill button, it changes but it does not stop or kill the process.

rfindler commented 3 years ago

I believe the issue here is that there are (probably too) large buffers in the IO implementation. So the stop/kill button actually did stop the work that was being done to figure out which bytes to print, but large number of bytes that were already put into the queue and are being processed by DrRacket (instead of the user's program) don't stop. So probably something needs to be improved here.

sorawee commented 3 years ago

See also https://github.com/racket/racket/issues/1677. That issue also talks about the problematic interaction between read and display.

sorawee commented 1 year ago

Fixed by https://github.com/racket/gui/commit/b51090c0a14109cb30538cc7752c23c6a2186b4e