Skip to content

Commit

Permalink
IDLE: Condense run.main threading.Thread start. (#106125)
Browse files Browse the repository at this point in the history
Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
  • Loading branch information
terryjreedy authored Jun 27, 2023
1 parent 9126a6a commit eaa1eae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Lib/idlelib/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit eaa1eae

Please sign in to comment.