Thread.start_new_thread vs threading.Thread.start

What is the difference between thread.start_new_threadand threading.Thread.startin python?
 I noticed that when calling, the start_new_threadnew thread terminates as soon as the calling thread terminates. threading.Thread.startis the opposite: the calling thread is waiting for other threads to complete.

+5
source share
2 answers

A module threadis a low-level Python streaming API. Its direct use is not recommended unless you need it. A module threadingis a high-level API built on top thread. The method Thread.startis implemented using thread.start_new_thread.

daemon thread start, , . Python , . daemon False, , , , -, , .


P.S. start_new_thread . Python, OS.

+8
0

All Articles