You can also do it if you use the exit()
function in your code. More ideally, you can do sys.exit()
. sys.exit()
which might terminate Python even if you are running things in parallel through the multiprocessing
package.
Note: In order to use the sys.exit()
, you must import it: import sys
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…