Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 73d8bff

Browse files
committed
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.
1 parent a70d160 commit 73d8bff

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

Doc/lib/libthread.tex

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,27 @@ \section{Built-in Module \module{thread}}
2424
Raised on thread-specific errors.
2525
\end{excdesc}
2626

27-
\begin{funcdesc}{start_new_thread}{func, arg}
28-
Start a new thread. The thread executes the function \var{func}
29-
with the argument list \var{arg} (which must be a tuple). When the
27+
\begin{datadesc}{LockType}
28+
This is the type of lock objects.
29+
\end{datadesc}
30+
31+
\begin{funcdesc}{start_new_thread}{function, args\optional{kwargs}}
32+
Start a new thread. The thread executes the function \var{function}
33+
with the argument list \var{args} (which must be a tuple). The
34+
optional \var{kwargs} argument specifies a dictionary of keyword
35+
arguments. When the
3036
function returns, the thread silently exits. When the function
3137
terminates with an unhandled exception, a stack trace is printed and
3238
then the thread exits (but other threads continue to run).
3339
\end{funcdesc}
3440

3541
\begin{funcdesc}{exit}{}
36-
This is a shorthand for \function{exit_thread()}.
42+
Raise the \exception{SystemExit} exception. When not caught, this
43+
will cause the thread to exit silently.
3744
\end{funcdesc}
3845

3946
\begin{funcdesc}{exit_thread}{}
40-
Raise the \exception{SystemExit} exception. When not caught, this
41-
will cause the thread to exit silently.
47+
This is an obsolete synonym for \function{exit()}.
4248
\end{funcdesc}
4349

4450
%\begin{funcdesc}{exit_prog}{status}

0 commit comments

Comments
 (0)