๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ‘จ๐Ÿผ‍๐Ÿ’ป๊ฐœ๋ฐœ/ํŒŒ์ด์ฌ

ํŒŒ์ด์ฌ - ์Šค๋ ˆ๋“œ ์ƒ๊ด€ ์—†์ด ํ”„๋กœ๊ทธ๋žจ ์™„์ „ ์ข…๋ฃŒ

by Janger 2022. 5. 7.
728x90
๋ฐ˜์‘ํ˜•
import os 
os._exit()

 

์ถœ์ฒ˜: 

https://stackoverflow.com/questions/905189/why-does-sys-exit-not-exit-when-called-inside-a-thread-in-python

 

Why does sys.exit() not exit when called inside a thread in Python?

I am confused as to why the following code snippet would not exit when called in the thread, but would exit when called in the main thread. import sys, time from threading import Thread def testex...

stackoverflow.com

 

728x90
๋ฐ˜์‘ํ˜•