diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2019-07-10 17:58:42 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-07-10 17:58:42 +0200 |
commit | f5de8c4292432753edfe9a05272fe26474a5a030 (patch) | |
tree | f5e43a25003f76c7c71afbb6ad1a19bfa2547f47 | |
parent | cac44165b005a4208684d0779532625543205629 (diff) | |
download | cython-f5de8c4292432753edfe9a05272fe26474a5a030.tar.gz |
Add a clarifying warning to the documentation of the "generate_cleanup_code" compiler option.
-rw-r--r-- | Cython/Compiler/Options.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Cython/Compiler/Options.py b/Cython/Compiler/Options.py index 78e144fc6..a634aaf56 100644 --- a/Cython/Compiler/Options.py +++ b/Cython/Compiler/Options.py @@ -58,8 +58,12 @@ pre_import = None #: Decref global variables in each module on exit for garbage collection. #: 0: None, 1+: interned objects, 2+: cdef globals, 3+: types objects -#: Mostly for reducing noise in Valgrind, only executes at process exit +#: Mostly for reducing noise in Valgrind as it typically executes at process exit #: (when all memory will be reclaimed anyways). +#: Note that directly or indirectly executed cleanup code that makes use of global +#: variables or types may no longer be safe when enabling the respective level since +#: there is no guaranteed order in which the (reference counted) objects will +#: be cleaned up. The order can change due to live references and reference cycles. generate_cleanup_code = False #: Should tp_clear() set object fields to None instead of clearing them to NULL? |