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.