broadcast
broadcast 模块的主要功能与函数
broadcast.
广播消息,广播消息后,其他线程可以接收到消息,参数:
# -*- coding: utf-8 -*- import haloboard import time import event @event.button_pressed def on_button_a_pressed(): print("button is pressed") haloboard.broadcast("hello") @event.received("hello") def received_cb(): print("received message: hello")