Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a7e3e2cd
Commit
a7e3e2cd
authored
May 16, 2015
by
Tal Einat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20182: converted the signal module to use Argument Clinic
parent
b9b9d205
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
684 additions
and
221 deletions
+684
-221
Doc/library/signal.rst
Doc/library/signal.rst
+6
-6
Modules/clinic/signalmodule.c.h
Modules/clinic/signalmodule.c.h
+432
-0
Modules/signalmodule.c
Modules/signalmodule.c
+246
-215
No files found.
Doc/library/signal.rst
View file @
a7e3e2cd
...
...
@@ -219,21 +219,21 @@ The :mod:`signal` module defines the following functions:
:func:`sigpending`.
.. function:: pthread_kill(thread_id, signum)
.. function:: pthread_kill(thread_id, sign
aln
um)
Send the signal *signum* to the thread *thread_id*, another thread in the
Send the signal *sign
aln
um* to the thread *thread_id*, another thread in the
same process as the caller. The target thread can be executing any code
(Python or not). However, if the target thread is executing the Python
interpreter, the Python signal handlers will be :ref:`executed by the main
thread <signals-and-threads>`. Therefore, the only point of sending a
signal to a particular
Python thread would be to force a running system call to fail with
:exc:`InterruptedError`.
thread <signals-and-threads>`. Therefore, the only point of sending a
signal to a particular Python thread would be to force a running system call
to fail with
:exc:`InterruptedError`.
Use :func:`threading.get_ident()` or the :attr:`~threading.Thread.ident`
attribute of :class:`threading.Thread` objects to get a suitable value
for *thread_id*.
If *signum* is 0, then no signal is sent, but error checking is still
If *sign
aln
um* is 0, then no signal is sent, but error checking is still
performed; this can be used to check if the target thread is still running.
Availability: Unix (see the man page :manpage:`pthread_kill(3)` for further
...
...
Modules/clinic/signalmodule.c.h
0 → 100644
View file @
a7e3e2cd
This diff is collapsed.
Click to expand it.
Modules/signalmodule.c
View file @
a7e3e2cd
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment