[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Problems with thread-sleep!
From: |
Felix |
Subject: |
Re: [Chicken-users] Problems with thread-sleep! |
Date: |
Wed, 01 Dec 2010 06:18:01 -0500 (EST) |
From: Karel Miklav <address@hidden>
Subject: [Chicken-users] Problems with thread-sleep!
Date: Tue, 30 Nov 2010 21:17:32 +0100
> I want to slow down a script to a number of cycles per
> second with:
>
> (thread-sleep! (/ 1 12))
>
> That however fails so I ended up importing numbers and
> adapting the line to:
>
> (thread-sleep! (exact->inexact (/ 1 12)))
>
> This call usually blocks within 10 retries. I don't
> have a clue what is going on and know little about
> scheme but it looks like something about numbers.
> These always work:
>
> (thread-sleep! 0.083)
>
> (thread-sleep! (/ (round (*
> (exact->inexact (/ 1 12)) 1000)) 1000))
>
> Anybody knows what is the problem?
Thanks for reporting this. The internal code that converted
a flonum timeout value into an exact number was broken.
See commit a56037b in the "master" branch of the git repository.
cheers,
felix