[pypy-commit] pypy default: Add a warning message when using stacklet_destroy() with
arigo
noreply at buildbot.pypy.org
Wed Nov 30 03:15:56 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r49996:5e4711c2e500
Date: 2011-11-30 03:14 +0100
http://bitbucket.org/pypy/pypy/changeset/5e4711c2e500/
Log: Add a warning message when using stacklet_destroy() with reference
counting.
diff --git a/pypy/rlib/_stacklet_n_a.py b/pypy/rlib/_stacklet_n_a.py
--- a/pypy/rlib/_stacklet_n_a.py
+++ b/pypy/rlib/_stacklet_n_a.py
@@ -1,4 +1,5 @@
from pypy.rlib import _rffi_stacklet as _c
+from pypy.rlib import objectmodel, debug
from pypy.rpython.annlowlevel import llhelper
from pypy.tool.staticmethods import StaticMethods
@@ -21,6 +22,9 @@
def destroy(thrd, h):
_c.destroy(thrd._thrd, h)
+ if objectmodel.we_are_translated():
+ debug.debug_print("not using a framework GC: "
+ "stacklet_destroy() may leak")
is_empty_handle = _c.is_empty_handle
More information about the pypy-commit
mailing list