Shashank Agarwal Thanks for your answer, I did that
test with both threads, but I had the same problem, maybe I need something else, do you want to see my code, maybe you can help me. or if you have an example with two threads, I will be happy to solve this problem with your help.
Thanks again.