Author: Armin Rigo <[email protected]>
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
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to