[plt-scheme] Problem with teachpaks

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Wed Jan 22 15:15:19 EST 2003

John Clements wrote:
> On Tuesday, January 21, 2003, at 01:41  PM, Jens Axel Søgaard wrote:

>> I have problems using gui.ss and draw.ss at the same time.

> Please, someone correct me if I'm wrong...
>
> If sleep-for-a-while calls sleep, you'll be blocking the user's
> thread.
...
> What about a call to sleep/yield instead?

You were absolutely right. The teachpack draw.ss used sleep.

In   collects\htdp\big-draw.ss  I changed

  (define sleep-for-a-while/proc (make-true sleep))

to

  (define sleep-for-a-while/proc (make-true mred:sleep/yield))

and it worked beautifully.


Thanks very much,
--
Jens Axel Søgaard




Posted on the users mailing list.