[solved]Thread sync problems!
I have two threads running in my program here. the main thread and one i call command(read) thread. When i hit a button i want the program to its job while i can still act with the gui. I want this because i have a halt button also. which will eventually halt my read() process and still print to a txtarea the result i was able to get before the halt.
what i have now is i can interact with the gui but the txtarea's text is set before the read is finished. i have tried setting the priority of the main thread lower than the read thread, but the yeild statement just doesn't yeild long enough until the read is finished, and ends up setting the txtarea to "" because the read isnt finished but the main thread keeps going on to the txtarea.settext statement.
i have also tried the wait/notify route, but this ends up freezing my gui until the read is finished. the textarea ends up being correct but i cant interact with my gui for the halt.
anyone with an idea of how i can mix the two or soemthing different i need help please.
thanks in advance