[pypy-commit] stmgc finalizer: update comments
arigo
noreply at buildbot.pypy.org
Fri Oct 17 11:34:25 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: finalizer
Changeset: r1474:1ff20d0478c9
Date: 2014-10-17 11:34 +0200
http://bitbucket.org/pypy/stmgc/changeset/1ff20d0478c9/
Log: update comments
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -516,11 +516,15 @@
stmcb_finalizer() is called after the major GC. If there are
several objects with finalizers that reference each other in a
well-defined order (i.e. there are no cycles), then they are
- finalized in order from outermost to innermost (i.e. starting with
- the ones that are unreachable even from others). The finalizer is
- called in a random thread, except for objects that have been
- created by the current transaction in a thread; in that case, only
- that thread can call the finalizer. */
+ finalized in order from outermost to innermost (i.e. starting with
+ the ones that are unreachable even from others).
+
+ For objects that have been created by the current transaction, if a
+ major GC runs while that transaction is alive and finds the object
+ unreachable, the finalizer is called immediately in the same
+ transaction. For older objects, the finalizer is called from a
+ random thread between regular transactions, in a new custom
+ transaction. */
void (*stmcb_finalizer)(object_t *);
object_t *stm_allocate_with_finalizer(ssize_t size_rounded_up);
More information about the pypy-commit
mailing list