Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 616a6ba

Browse filesBrowse files
author
Anselm Kruis
committed
Stackless issue python#81: don't raise TaskletExit in daemon threads during shutdown
Since issue python#81 Stackless 2.7 raises TaskletExit in daemon threads during interpreter shutdown. This prevents later crashes (i.e. segfaults). In Python 3 this precautions are no longer required and break the CPython test case test.test_threading.ThreadJoinOnShutdown.test_6_daemon_threads. This changeset removes the code, that raises TaskletExit.
1 parent 011078a commit 616a6ba
Copy full SHA for 616a6ba

File tree

Expand file treeCollapse file tree

2 files changed

+2
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-6
lines changed

‎Stackless/changelog.txt

Copy file name to clipboardExpand all lines: Stackless/changelog.txt
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ What's New in Stackless 3.X.X?
3434
- https://bitbucket.org/stackless-dev/stackless/issues/81
3535
Fix (crash) bugs during thread and interpreter shutdown.
3636
If a thread dies, Stackless now really kills tasklets with C-state. During
37-
interpreter shutdown, Stackless also kills daemon threads, if they execute
38-
Python code or switch tasklets. This change avoids crashes during a later
39-
shutdown stage.
37+
interpreter shutdown, Stackless also kills daemon threads, if they switch
38+
tasklets. This change avoids crashes during a later shutdown stage.
4039

4140
- https://bitbucket.org/stackless-dev/stackless/issues/92
4241
If you run Stackless with the option '-v' (or set the environment variable

‎Stackless/core/stacklesseval.c

Copy file name to clipboardExpand all lines: Stackless/core/stacklesseval.c
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,6 @@ void slp_kill_tasks_with_stacks(PyThreadState *target_ts)
516516
*/
517517
count++;
518518
kill_pending_current_main_and_watchdogs(ts);
519-
/* It helps to inactivate threads reliably */
520-
if (PyExc_TaskletExit)
521-
PyThreadState_SetAsyncExc(ts->thread_id, PyExc_TaskletExit);
522519
}
523520
}
524521
/* We must not release the GIL while we might hold the HEAD-lock.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.