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代码解决的这个问题