[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SCM_DEFER_INTS versus error
From: |
Kevin Ryde |
Subject: |
SCM_DEFER_INTS versus error |
Date: |
Tue, 05 Aug 2003 11:37:17 +1000 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) |
I noticed in the little program below, the thread seems to get hung
after an error in the mainline has done an SCM_DEFER_INTS in strptime
then escaped with an error, apparently not doing an SCM_ALLOW_INTS.
Is there a theory on what should happen with this? Is an error meant
to re-allow ints or should code be careful to do an ALLOW after any
DEFER? The latter no doubt makes sense irrespective of what an error
throw does.
Incidentally, I don't think I understand why current-time has a
SCM_DEFER_INTS. A simple call to time() ought to be safe shouldn't
it?
(use-modules (ice-9 threads))
(begin-thread
(display "thread started\n")
(sleep 2)
(display "thread awake again\n")
(display "thread trying current-time\n")
(current-time)
(display "thread done\n"))
(sleep 1)
(catch #t
(lambda () (strptime "xxx" "%Y"))
(lambda args
(display "main caught strptime error\n")))
(sleep 10)
(display "main exiting\n")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- SCM_DEFER_INTS versus error,
Kevin Ryde <=