Well, you told me, that this is the problem. I tried a lot of different code, but I do not get it working. Is there anybody out there who can help us with a code example?
Due to your post I can see that you have the strong believe that most of the peolpe who ask for help did not try out code for a long time to get it working.
Well, I really feel sorry for you that you are thinking in that negative way about other people.
Do you really think it makes sense to bother others with tons of code that is not working the way it should be? You can handle it this way to spam the forum, waste time and energy and wrongly train people reading that code.
In my opinion a forum is a place where somebody should receive help when he or she asks for help. I have tried out code for many hours but unfortunately I am not that well trained to get it working because I am not an expert. So I ended up in this forum in order to ask for a help. Question - Answer. That´s it - no more, no less.
If you are able to help because you are an expert in multithreading, then feel free to help me/us.
If not you can bully somebody else.