jaese
jaese

Reputation: 165

racket hangs at sleep when racket/gui is imported

On Linux and Racket v5.3, next program runs as expected,

#lang racket

(let loop ([i 0])
    (printf "~a\n" i)
    (sleep 0.01)
    (loop (add1 i)))

But this hangs after printing up to around 200,

#lang racket
(require racket/gui)

(let loop ([i 0])
    (printf "~a\n" i)
    (sleep 0.01)
    (loop (add1 i)))

This problem does not arise when running inside DrRacket. Is this a bug or am I missing something? If a bug, is there a workaround?

Upvotes: 3

Views: 295

Answers (2)

Sam Tobin-Hochstadt
Sam Tobin-Hochstadt

Reputation: 5053

This has now been fixed in the latest development version, see this commit.

Upvotes: 2

Eli Barzilay
Eli Barzilay

Reputation: 29556

It looks like a bug -- do you mind filing a bug report using the web page, or preferably using DrRacket?

Upvotes: 3

Related Questions