On 2/5/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:
Hi folks,I've had a very strange experience with the following piece of code, which is supposed to run a scheduled-task every twelve hours, and clean up stale sessions from a session-table: (define *stale-session-monitor* #f) (define (start-stale-session-monitor) (when (not *stale-session-monitor*) (set! *stale-session-monitor* (thread-start! (make-thread (lambda () (log-info "*stale-session-monitor* : starting") (let loop () (thread-sleep! (* 3600 12)) (log-info "*stale-session-monitor* : cleaning up session table...") (clean-up-old-sessions 12) (loop)))))))) (start-stale-session-monitor) The code has been running fine for days --- and then suddenly, in the middle of the night, it just *snapped* --- the loop was running more than 2000 (clean-up-old-sessions) calls per minute. It ran this way from 2:55am until about 4:22am --- at which time it stopped, and returned to its normal 12 hour cycle. The two times are meaningless in the context of the app, and neither occurs near any user activity or other external trigger that I can find. It looks like (thread-sleep!) stopped working for a while --- it just didn't sleep at all, for ~200,000 iterations --- and then went back to normal, all by itself.
Naturally, I don't have a clue what's going on here. This could be a scheduler bug. Oh boy... I will try to figure out some test program. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
