#1364: Finalizers not guaranteed to run before the program exits
-------------------------------------+--------------------------------------
    Reporter:  [EMAIL PROTECTED]  |        Owner:                  
        Type:  feature request       |       Status:  new             
    Priority:  normal                |    Milestone:  6.10            
   Component:  Runtime System        |      Version:  6.6.1           
    Severity:  normal                |   Resolution:                  
    Keywords:                        |   Difficulty:  Moderate (1 day)
          Os:  Unknown               |     Testcase:                  
Architecture:  Unknown               |  
-------------------------------------+--------------------------------------
Changes (by simonmar):

  * difficulty:  Unknown => Moderate (1 day)
  * component:  libraries/base => Runtime System
  * milestone:  => 6.10
  * type:  bug => feature request

Comment:

 GHC has support for registering Haskell functions as finalizers, see the
 module Foreign.Concurrent.  The problem is that it isn't practical to
 guarantee that finalizers all run before program exit when the finalizers
 themselves are Haskell code (The Boehm paper on finalizers has the
 rationale: [http://citeseer.ist.psu.edu/boehm03destructors.html]).

 However, we could make an exception for C finalizers registered via
 `Foreign.ForeignPtr`, and give these extra guarantees.  This has been
 requested before, and I think it would be a useful feature.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1364>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to