本文整理汇总了Python中output.Output.stopAll方法的典型用法代码示例。如果您正苦于以下问题:Python Output.stopAll方法的具体用法?Python Output.stopAll怎么用?Python Output.stopAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类output.Output
的用法示例。
在下文中一共展示了Output.stopAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LircClient
# 需要导入模块: from output import Output [as 别名]
# 或者: from output.Output import stopAll [as 别名]
lirc = LircClient(lircListener)
#output.addListener(WsListener(lircListener))
#MidiBridge(subMaster)
LightWake(showManager)
gpio = GPIOInput([4])
ChannelMapping(gpio.universe[0], subMaster.getChannel('dimmer white'))
run = True
while run:
try:
time.sleep(10)
except (KeyboardInterrupt):
Output.stopAll()
run = False
print('killing background threads...')
for thread in threading.enumerate():
if (thread != threading.currentThread()):
try:
thread.stop()
print("regular stop: " + str(thread))
except AttributeError:
print("force kiling " + str(thread))
exc = ctypes.py_object(SystemExit)
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(thread.ident), exc)
if res == 0:
raise ValueError("nonexistent thread id")
elif res > 1: