Skip to content

Commit

Permalink
[3.12] IDLE: Condense run.main threading.Thread start. (GH-106125) (#…
Browse files Browse the repository at this point in the history
…106154)

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

Co-authored-by: Terry Jan Reedy <[email protected]>
  • Loading branch information
miss-islington and terryjreedy authored Jun 27, 2023
1 parent 0555722 commit 264b54b
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 264b54b

Please sign in to comment.