mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00: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
1 changed files with 6 additions and 5 deletions
|
@ -140,11 +140,12 @@ def main(del_exitfunc=False):
|
||||||
|
|
||||||
capture_warnings(True)
|
capture_warnings(True)
|
||||||
sys.argv[:] = [""]
|
sys.argv[:] = [""]
|
||||||
sockthread = threading.Thread(target=manage_socket,
|
threading.Thread(target=manage_socket,
|
||||||
name='SockThread',
|
name='SockThread',
|
||||||
args=((LOCALHOST, port),))
|
args=((LOCALHOST, port),),
|
||||||
sockthread.daemon = True
|
daemon=True,
|
||||||
sockthread.start()
|
).start()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
if exit_now:
|
if exit_now:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue