def stop(stimuli, bci, graph, bci_queue, pupil=None):
print('Terminating from the main thread...')
#termination handling for windows
event.set()
while True:
if bci_queue is None or bci_queue.get() == 'SAVED_BCI' or os.name != 'nt':
#(in windows) 'SAVED_BCI' ensures data has saved before process termination
try:
stimuli.terminate()
bci.terminate()
graph.terminate()
os._exit(0)
except AttributeError:
pass
break
if pupil:
pupil.terminate()
评论列表
文章目录