IDLE: Condense run.main threading.Thread start. (#106125)

Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
This commit is contained in:
Terry Jan Reedy 2023-06-27 13:12:56 -04:00 committed by GitHub
parent 9126a6a9ce
commit eaa1eae55e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: