NoticeCenter支持安全类型转换,解决监听者参数类型不一致导致的bug

This commit is contained in:
xia-chu
2023-09-02 10:52:07 +08:00
parent c35b5e9215
commit d286ac1d73
22 changed files with 43 additions and 46 deletions

View File

@@ -271,7 +271,7 @@ static void sendReport() {
}
static toolkit::onceToken s_token([]() {
NoticeCenter::Instance().addListener(nullptr, "kBroadcastEventPollerPoolStarted", [](EventPollerPool &pool, size_t &size) {
NoticeCenter::Instance().addListener(nullptr, "kBroadcastEventPollerPoolStarted", [](EventPollerPoolOnStartedArgs) {
// 第一次汇报在程序启动后5分钟
pool.getPoller()->doDelayTask(5 * 60 * 1000, []() {
sendReport();