I have made an application that transmitts RS232 text strings. I have only made two classes so far but there will be more soon.
Here is what the code look like now
|
As you can se, class "Hello" sends Hello and then 2 seconds later Tjosilosan.
Works so far. But if a would call "Hello" and "World" at the same time, First Hello would be sent, two seconds later Tjosilosan and then World.
I dont want it to be this way, Hello, and World should be sent at the same time and then 2 seconds after Tjosilosan will be sent.
This might not be the ultimate solution to the problem, but i wanna solve this with MultiThreading. So that class "Hello" is one thread, and class "World" is another thread.
I have looked at this http://msdn.microsoft.com/en-us/library/7a2f3ay4.aspx but don't understand how to do.
Can anyone help me with creating multiple-threads of the classes?
Replies
Know the answer? Post it — somebody with the same question will find it here.