summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-27 17:35:48 (GMT)
committerGitHub <noreply@github.com>2023-06-27 17:35:48 (GMT)
commit264b54bf51dfbc1c6901389eb4bf8c2f8ea542a7 (patch)
treed815b5915a075f049bd61984b1b13fd1adb3141b /Lib/idlelib
parent0555722a8a4a6555153c37617f7fb17e7f7f86a8 (diff)
downloadcpython-264b54bf51dfbc1c6901389eb4bf8c2f8ea542a7.zip
cpython-264b54bf51dfbc1c6901389eb4bf8c2f8ea542a7.tar.gz
cpython-264b54bf51dfbc1c6901389eb4bf8c2f8ea542a7.tar.bz2
[3.12] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106154)
IDLE: Condense run.main threading.Thread start. (GH-106125) Use daemon argument added in 3.3 and directly call .start. Remove now unused 'sockthread' name. (cherry picked from commit eaa1eae55ea66d74c5303924320185dac74d4eb1) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/run.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 4ffc90a..53e80a9 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -140,11 +140,12 @@ def main(del_exitfunc=False):
capture_warnings(True)
sys.argv[:] = [""]
- sockthread = threading.Thread(target=manage_socket,
- name='SockThread',
- args=((LOCALHOST, port),))
- sockthread.daemon = True
- sockthread.start()
+ threading.Thread(target=manage_socket,
+ name='SockThread',
+ args=((LOCALHOST, port),),
+ daemon=True,
+ ).start()
+
while True:
try:
if exit_now: