Changes between Version 28 and Version 29 of Commentary/Rts/Storage/HeapObjects


Ignore:
Timestamp:
Jul 12, 2013 5:12:49 AM (10 months ago)
Author:
ezyang
Comment:

blackholes

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/Storage/HeapObjects

    v28 v29  
    374374 
    375375{{{BLACKHOLE}}}, {{{CAF_BLACKHOLE}}} 
     376 
     377Black holes represent thunks which are under evaluation by another thread (that thread is said to have claimed the thunk).  Attempting to evaluate a black hole causes a thread to block until the thread who claimed the thunk either finishes evaluating the thunk or dies.  You can read more about black holes in the paper 'Haskell on a Shared-Memory Multiprocessor'. 
     378 
     379Mysteriously enough, sometimes black holes act just like a normal indirection. The gory details are in `stg_BLACKHOLE_info`, but the short version is that if the indirectee has no tagged, then we assume that it is the TSO that has claimed the thunk; if the indirectee is tagged, then it is just a normal indirection. The moral of the story is you should enter a closure to be sure ;) 
    376380 
    377381=== Arrays ===