unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* SCM_DEFER_INTS versus error
@ 2003-08-05  1:37 Kevin Ryde
  2003-09-17 22:58 ` Marius Vollmer
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Ryde @ 2003-08-05  1:37 UTC (permalink / raw)


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")


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-12-06 21:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-05  1:37 SCM_DEFER_INTS versus error Kevin Ryde
2003-09-17 22:58 ` Marius Vollmer
2003-09-19 20:34   ` Tom Lord
2003-09-22 18:01     ` Marius Vollmer
2003-09-20 23:44   ` Kevin Ryde
2003-09-22 18:10     ` Marius Vollmer
2003-09-23  1:01       ` Mikael Djurfeldt
2003-10-07 17:54         ` Marius Vollmer
2003-12-06 21:15       ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).