diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2023-06-27 17:12:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 17:12:56 (GMT) |
commit | eaa1eae55ea66d74c5303924320185dac74d4eb1 (patch) | |
tree | 6e15c261ca9919caab8fec820a4517c37901d60e /Lib/idlelib | |
parent | 9126a6a9ce3772d5dc785cbee159b07a1ff7d531 (diff) | |
download | cpython-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.py | 11 |
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: |