Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I am creating an app that reads bit values from an opc and calculates an state based on which ones are active. Problem is sometimes they change in pairs at the same time and the subscription that is listening to that runs twice and gives two simultaneous results. Is there any way to make the service wait untils it's finished before running again? It is currently written in java using the thingworx extension library and it's already synchronous.
Thank you
Solved! Go to Solution.
We managed to solve it. using the synchronized word in java already makes that happen. If it still happens "simultaneously" is most likely because it runs too fast. I added a Thread.sleep for 250 milis and worked like a charm. Hope it helps you!
Looking for the same issue. Bumped into your thread. Thanks for creating it. Looking forward for solution.
We managed to solve it. using the synchronized word in java already makes that happen. If it still happens "simultaneously" is most likely because it runs too fast. I added a Thread.sleep for 250 milis and worked like a charm. Hope it helps you!