本文整理汇总了Python中threading.Thread._stop方法的典型用法代码示例。如果您正苦于以下问题:Python Thread._stop方法的具体用法?Python Thread._stop怎么用?Python Thread._stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类threading.Thread
的用法示例。
在下文中一共展示了Thread._stop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: extractZip
# 需要导入模块: from threading import Thread [as 别名]
# 或者: from threading.Thread import _stop [as 别名]
def extractZip(zipFile, password):
try:
zipFile.extractall(pwd=password)
stdout.write('[+] Pass : %s' % password.decode())
Thread._stop()
except:
pass
示例2: main
# 需要导入模块: from threading import Thread [as 别名]
# 或者: from threading.Thread import _stop [as 别名]
SendObj.initNRF24()
SendObj._thisAddress = 1;
SendObj.setRXAddress(0,'cln1')
SendObj.setRXAddress(1,'serv')
SendObj.setTXAddress('cln1')
SendObj.printRegisterMap()
SendObj._radio_pin.value = 0
SendObj.closeCEpin()
elif rxtx == 'm':
main(['Dh_20_Dt_30_Up_40',30])
except(KeyboardInterrupt,SystemExit): #If ctrl+c breaks operation or system shutdown; no Traceback is shown
SendObj._radio_pin.value = 0
SendObj._radio_pin.close() #First close the CE-pin, so that it can be opened again without error!
pin1.close()
t1._stop()#stop thread t1
print("\n\nKeyboard Interrupt => GPIO-PIN closed!\n")
pass #continue to break or shutdown! hodes traceback
except Exception: #in case of other errors closes CE pin and shows error message
SendObj._radio_pin.value = 0
SendObj._radio_pin.close() #First close the CE-pin, so that it can be opened again without error!
pin1.close()
t1._stop()#stop thread t1
print("\n\nOther ERRO => GPIO-PIN closed!\n")
raise#pass