I have a race condition between two task threads in Wildfly. My system coordinates between multiple other systems. I have an object that holds the state of an interaction. Occasionally two requests for the same interaction come in at the same time. I am investigating ways to coordinate between the task threads handling the two requests.
Is is a bad idea to use Thread.interrupt() in a worker thread.
I am currently using java 8 on wildfly 18