mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
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:
parent
9126a6a9ce
commit
eaa1eae55e
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user