[previous] [up] [next]     [index]
Next: Garbage Collection Up: Memory Management Previous: Weak Boxes

Will Executors

A will executor manages a collection of values and associated will procedures. The will procedure for each value is ready to be executed when the value has been proven (by the automatic memory manager) to be unreachable, except through will executors, weak boxes, weak hash table keys, and custodians.

Calling the will-execute or will-try-execute procedure executes a will that is ready in the specified will executor.

If a value is registered with multiple wills (in one or multiple executors), the wills are readied in the reverse order of registration. Since readying a will procedure makes the value reachable again, the will must be executed and the value must be proven unreachable once again before another of the wills is readied or executed. However, wills for distinct unreachable values are readied at the same time, regardless of whether the values are reachable from each other.

If the content value of a weak box (and/or a key in a weak hash table) is registered with a will executor, the weak box's content is not changed to #f (and/or the weak hash table entry is not removed) until all wills have been executed for the value and the value has been proven unreachable again.


[previous] [up] [next]     [index]
Next: Garbage Collection Up: Memory Management Previous: Weak Boxes

PLT