Commit 71dca6e
When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown. If many threads are created this way, the _shutdown_locks set could therefore grow endlessly. To avoid such a situation, purge expired locks each time a new one is added or removed.
(cherry picked from commit c10c2ec)
Co-authored-by: Antoine Pitrou <antoine@python.org>
1 parent 2e99869 commit 71dca6e
File tree
3 files changed
+26
-1
lines changed- Lib
- test
- Misc/NEWS.d/next/Library
3 files changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
910 | 917 | | |
911 | 918 | | |
912 | 919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| 783 | + | |
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
789 | 804 | | |
790 | 805 | | |
791 | 806 | | |
| |||
968 | 983 | | |
969 | 984 | | |
970 | 985 | | |
| 986 | + | |
971 | 987 | | |
972 | 988 | | |
973 | 989 | | |
| |||
1023 | 1039 | | |
1024 | 1040 | | |
1025 | 1041 | | |
1026 | | - | |
| 1042 | + | |
| 1043 | + | |
1027 | 1044 | | |
1028 | 1045 | | |
1029 | 1046 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments