Subject: Unexpected behaviour of scm_gc+sleep/usleep in another thread

From: Panicz Maciej Godek <[email-masked]>
Date: Thu, 30 May 2013 13:06:51 +0200

Hi,
I've noticed that when a thread is asleep and (gc) or scm_gc() is called,
it gets awoken. It can be demonstrated with the following example:

> (call-with-new-thread
    (lambda()
      (while #t
        (display "tick!\n")
        (sleep 5)))) ;; <= this is 5 seconds!

> (gc)
tick! ;; this happens immediately after each call to gc!

This behaviour is both unexpected and undocumented, so I consider it a bug.