summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2023-06-27 17:12:56 (GMT)
committerGitHub <noreply@github.com>2023-06-27 17:12:56 (GMT)
commiteaa1eae55ea66d74c5303924320185dac74d4eb1 (patch)
tree6e15c261ca9919caab8fec820a4517c37901d60e /Lib/idlelib
parent9126a6a9ce3772d5dc785cbee159b07a1ff7d531 (diff)
downloadcpython-eaa1eae55ea66d74c5303924320185dac74d4eb1.zip
cpython-eaa1eae55ea66d74c5303924320185dac74d4eb1.tar.gz
cpython-eaa1eae55ea66d74c5303924320185dac74d4eb1.tar.bz2
IDLE: Condense run.main threading.Thread start. (#106125)
Use daemon argument added in 3.3 and directly call .start. Remove now unused 'sockthread' name.
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: