--- Begin Message ---
Subject: |
Unexpected behaviour of scm_gc+sleep/usleep in another thread |
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.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread |
Date: |
Wed, 05 Jun 2013 13:38:44 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Panicz Maciej Godek <address@hidden> skribis:
> Yes, you're right. Sleep does behave as documented, but I didn't expect
> that gc might raise a signal.
> Sorry for the confusion.
No problem.
> However, I replaced the libgc.so with a newly compiled one (7.2d) and
> nothing changed, so I guess that the reason might be more casual
Hmm yes. Well, libgc can definitely resort to signals, but how it
chooses to do it is really an implementation detail, so I don’t know why
we’re seeing a difference here.
Ludo’.
--- End Message ---