CTK使用,多层嵌套的消息\订阅的数据错乱问题

CTK使用,多层嵌套的消息\订阅出现问题

问题:
在这里插入图片描述

Program operation process
1 、plugin 1 : publish topic1
2、plugin 2、3、4 receive topic1 event, Simultaneously publish topic 2 with parameters a, b, and c
3、plugin 5: The data received by plugin 5 should theoretically be abc or bca But the actual data received are BBC, Acc, and BCC,
Is there a problem with my use or something? Can you give me some advice? Thank you

就是插件1 发布一个主题topic 1;插件2、3、4同时接收到订阅,然后同时发布topic2,并且传数据a\b\c;
插件5接收到的数据应该是abc \ cba 。。。但是实际接受到的时 bcc\acc

solution:
By using eventAdmin ->subscribeSlot for subscription registration instead of using ctkEventHandler inheritance, the data will be normal

订阅注册使用eventAdmin->subscribeSlot,而不使用ctkEventHandler继承的方式,数据就正常了

后面高并发的使用还是会出现这个,后面通过修改CTK代码解决的这个问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值