[3.11] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106153)

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 eaa1eae55e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2023-06-27 10:37:20 -07:00 committed by GitHub
parent 86dbf1d112
commit fbb0151e5e
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: