Document optional kwargs argument to start_new_thread(). Also

document new LockType and reverse the preference for exit()
vs. exit_thread() -- exit() is now preferred and exit_thread() is
obsolete.
This commit is contained in:
Guido van Rossum 1998-06-27 18:25:44 +00:00
parent a70d160095
commit 73d8bff44d

View file

@ -24,21 +24,27 @@ It defines the following constant and functions:
Raised on thread-specific errors. Raised on thread-specific errors.
\end{excdesc} \end{excdesc}
\begin{funcdesc}{start_new_thread}{func, arg} \begin{datadesc}{LockType}
Start a new thread. The thread executes the function \var{func} This is the type of lock objects.
with the argument list \var{arg} (which must be a tuple). When the \end{datadesc}
\begin{funcdesc}{start_new_thread}{function, args\optional{kwargs}}
Start a new thread. The thread executes the function \var{function}
with the argument list \var{args} (which must be a tuple). The
optional \var{kwargs} argument specifies a dictionary of keyword
arguments. When the
function returns, the thread silently exits. When the function function returns, the thread silently exits. When the function
terminates with an unhandled exception, a stack trace is printed and terminates with an unhandled exception, a stack trace is printed and
then the thread exits (but other threads continue to run). then the thread exits (but other threads continue to run).
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{exit}{} \begin{funcdesc}{exit}{}
This is a shorthand for \function{exit_thread()}. Raise the \exception{SystemExit} exception. When not caught, this
will cause the thread to exit silently.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{exit_thread}{} \begin{funcdesc}{exit_thread}{}
Raise the \exception{SystemExit} exception. When not caught, this This is an obsolete synonym for \function{exit()}.
will cause the thread to exit silently.
\end{funcdesc} \end{funcdesc}
%\begin{funcdesc}{exit_prog}{status} %\begin{funcdesc}{exit_prog}{status}