Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -842,18 +842,18 @@ code, or when embedding the Python interpreter:

.. c:function:: PyThreadState* PyEval_SaveThread()

Release the global interpreter lock (if it has been created and thread
support is enabled) and reset the thread state to *NULL*, returning the
previous thread state (which is not *NULL*). If the lock has been created,
the current thread must have acquired it.
Release the global interpreter lock (if it has been created) and reset the
thread state to *NULL*, returning the previous thread state (which is not
*NULL*). If the lock has been created, the current thread must have
acquired it.


.. c:function:: void PyEval_RestoreThread(PyThreadState *tstate)

Acquire the global interpreter lock (if it has been created and thread
support is enabled) and set the thread state to *tstate*, which must not be
*NULL*. If the lock has been created, the current thread must not have
acquired it, otherwise deadlock ensues.
Acquire the global interpreter lock (if it has been created) and set the
thread state to *tstate*, which must not be *NULL*. If the lock has been
created, the current thread must not have acquired it, otherwise deadlock
ensues.


.. c:function:: PyThreadState* PyThreadState_Get()
Expand Down
4 changes: 1 addition & 3 deletions Doc/library/queue.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
The :mod:`queue` module implements multi-producer, multi-consumer queues.
It is especially useful in threaded programming when information must be
exchanged safely between multiple threads. The :class:`Queue` class in this
module implements all the required locking semantics. It depends on the
availability of thread support in Python; see the :mod:`threading`
module.
module implements all the required locking semantics.

The module implements three types of queue, which differ only in the order in
which the entries are retrieved. In a :abbr:`FIFO (first-in, first-out)`
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
_multiprocessing = test.support.import_module('_multiprocessing')
# Skip tests if sem_open implementation is broken.
test.support.import_module('multiprocessing.synchronize')
# import threading after _multiprocessing to raise a more relevant error
# message: "No module named _multiprocessing". _multiprocessing is not compiled
# without thread support.
import threading

import multiprocessing.connection
Expand Down
6 changes: 1 addition & 5 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,14 @@ PyEval_ReInitThreads(void)
}

/* This function is used to signal that async exceptions are waiting to be
raised, therefore it is also useful in non-threaded builds. */
raised. */

void
_PyEval_SignalAsyncExc(void)
{
SIGNAL_ASYNC_EXC();
}

/* Functions save_thread and restore_thread are always defined so
dynamically loaded modules needn't be compiled separately for use
with and without threads: */

PyThreadState *
PyEval_SaveThread(void)
{
Expand Down