From: simonmar Date: Wed, 24 Mar 2004 16:51:31 +0000 (+0000) Subject: [project @ 2004-03-24 16:51:31 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1938 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6f23a6ec00f7edad1fdc0aeb61e36eae807fe408;p=ghc-hetmet.git [project @ 2004-03-24 16:51:31 by simonmar] Add a FAQ about finalizers and stdout/stderr. --- diff --git a/ghc/docs/users_guide/faq.sgml b/ghc/docs/users_guide/faq.sgml index 21c2434..0e0b980 100644 --- a/ghc/docs/users_guide/faq.sgml +++ b/ghc/docs/users_guide/faq.sgml @@ -372,6 +372,24 @@ details. + + I can't get finalizers to work properly. My program + sometimes just prints + <<loop>>. + + + Chances are that your program is trying to write a + message to stdout or + stderr in the finalizer. Handles have + finalizers themselves, and since finalizers don't keep other + finalized values alive, the stdout and + stderr Handles may be finalized before your + finalizer runs. If this happens, your finalizer will block on + the handle, and probably end up receiving a + NonTermination exception (which is printed + as <<loop>>). + +