]> granicus.if.org Git - python/commitdiff
Py_AtExit(): Added brief note about the constraint on cleanup functions not
authorFred Drake <fdrake@acm.org>
Mon, 26 Jan 1998 19:16:27 +0000 (19:16 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 26 Jan 1998 19:16:27 +0000 (19:16 +0000)
      calling the Python API.

Doc/api.tex
Doc/api/api.tex

index 4e1a8508d60470482a69432f4a7a5b2d3f380c21..26fc104984f2405f9945f9555755e6a02f09cb9d 100644 (file)
@@ -542,12 +542,15 @@ calls the standard \C{} library function \code{exit(0)}.
 \end{cfuncdesc}
 
 \begin{cfuncdesc}{int}{Py_AtExit}{void (*func) ()}
-Register a cleanup function to be called by \code{Py_Finalize()}.  The
-cleanup function will be called with no arguments and should return no
-value.  At most 32 cleanup functions can be registered.  When the
-registration is successful, \code{Py_AtExit} returns 0; on failure, it
-returns -1.  The cleanup function registered last is called first.
-Each cleanup function will be called at most once.
+Register a cleanup function to be called by \cfunction{Py_Finalize()}.
+The cleanup function will be called with no arguments and should
+return no value.  At most 32 cleanup functions can be registered.
+When the registration is successful, \cfunction{Py_AtExit()} returns
+\code{0}; on failure, it returns \code{-1}.  The cleanup function
+registered last is called first.  Each cleanup function will be called
+at most once.  Since Python's internal finallization will have
+completed before the cleanup function, no Python APIs should be called
+by \var{func}.
 \end{cfuncdesc}
 
 
index 4e1a8508d60470482a69432f4a7a5b2d3f380c21..26fc104984f2405f9945f9555755e6a02f09cb9d 100644 (file)
@@ -542,12 +542,15 @@ calls the standard \C{} library function \code{exit(0)}.
 \end{cfuncdesc}
 
 \begin{cfuncdesc}{int}{Py_AtExit}{void (*func) ()}
-Register a cleanup function to be called by \code{Py_Finalize()}.  The
-cleanup function will be called with no arguments and should return no
-value.  At most 32 cleanup functions can be registered.  When the
-registration is successful, \code{Py_AtExit} returns 0; on failure, it
-returns -1.  The cleanup function registered last is called first.
-Each cleanup function will be called at most once.
+Register a cleanup function to be called by \cfunction{Py_Finalize()}.
+The cleanup function will be called with no arguments and should
+return no value.  At most 32 cleanup functions can be registered.
+When the registration is successful, \cfunction{Py_AtExit()} returns
+\code{0}; on failure, it returns \code{-1}.  The cleanup function
+registered last is called first.  Each cleanup function will be called
+at most once.  Since Python's internal finallization will have
+completed before the cleanup function, no Python APIs should be called
+by \var{func}.
 \end{cfuncdesc}