[docs] [issue14456] Relation between threads and signals unclear

Sven Marnach report at bugs.python.org
Sat Mar 31 01:12:58 CEST 2012

New submission from Sven Marnach <sven at marnach.net>:

The documentation of the 'signal' module states on the one hand

    [T]he main thread will be the only one to receive signals (this is
    enforced by the Python signal module, even if the underlying thread
    implementation supports sending signals to individual threads).

On the other hand, it provides the function 'pthread_kill()':

    Send the signal signum to the thread thread_id, another thread in
    the same process as the caller. The signal is asynchronously
    directed to thread.

These two passages are in contradiction to each other.  The documentation also states that only the main thread can set signal handlers -- if this is true, it is utterly unclear how sending signals to other threads is useful.

Probably the documentation wasn't fully updated when the above function was introduced.

assignee: docs at python
components: Documentation
messages: 157156
nosy: docs at python, smarnach
priority: normal
severity: normal
status: open
title: Relation between threads and signals unclear
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the docs mailing list