Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I am implementing some TOFF logic in my application.
I have a Thing with a subscription listening to some state tags in an opc server. I have to calculate the final state based on this. S
ometimes two states change simultaneously firing the event twice at the same time which i do not want because it executes the change state logic twice in parallel in different processors obtaining the same result twice and firing the subscripiton listening if the state has changed to fire twice simultaneously despite in practice having only one change.
Is it possible to force the subscription to only execute in a single processor so that the second firing is after the first instead of simlutaneous?
Solved! Go to Solution.
For anyone interested i found a satisfying answer in this post: https://community.ptc.com/t5/IoT-Tech-Tips/Thread-Safe-Coding-in-ThingWorx-Part-1-The-Java-Extension/td-p/700958
For anyone interested i found a satisfying answer in this post: https://community.ptc.com/t5/IoT-Tech-Tips/Thread-Safe-Coding-in-ThingWorx-Part-1-The-Java-Extension/td-p/700958