[plt-scheme] Idiom for suspending the top level thread
In Java, if the thread that starts a program stops, the JVM
will not exit if there are other threads running (modulo
some interactions with daemon threads I forget).
In MzScheme, if the thread that starts a program stops
MzScheme exits. (Verified with a test program in 349.100;
couldn't find an discussion in the docs)
What is the preferred idiom for suspending the top level
thread to stop a program exiting? I don't have access to
the other threads I've spawned. Ideas include:
(let loop () (loop)) ;; busy wait
(thread-suspend (current-thread))
(thread-wait (current-thread))
TIA,
Noel
Email: noelwelsh <at> yahoo <dot> com noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/ http://www.untyped.com/untyping/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com