[GHC] #1364: Finalizers not guaranteed to run before the program exits

GHC trac at galois.com
Mon Jul 28 15:11:45 EDT 2008


#1364: Finalizers not guaranteed to run before the program exits
----------------------------------+-----------------------------------------
 Reporter:  tomac at pacific.net.au  |          Owner:  simonmar        
     Type:  feature request       |         Status:  new             
 Priority:  normal                |      Milestone:  6.10.1          
Component:  Runtime System        |        Version:  6.6.1           
 Severity:  normal                |     Resolution:                  
 Keywords:                        |     Difficulty:  Moderate (1 day)
 Testcase:                        |   Architecture:  Unknown         
       Os:  Unknown               |  
----------------------------------+-----------------------------------------
Comment (by Svarog):

 Replying to [comment:8 tibbe]:
 >
 > Will this add a performance penalty (i.e. extra GC overhead) to code
 that does not make use of finalizers?

 I'm pretty sure that it won't. The only overhead is that the weak pointer
 struct now has an extra field for a C finalizer and the code that goes
 through dead weak pointers and schedules existing Haskell finalizers has
 an extra if statement to check for C finalizers and run them immediately.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1364#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list