Click here to Skip to main content
15,909,193 members

Comments by Zsefv2 (Top 17 by date)

Zsefv2 23-Nov-11 3:28am View    
Its not locked, I have the mechanisms in place to take care of deadlocks. The problem i had before was the main thread was doing the reading of messages that it hangs the UI. nonetheless thanks for replying to my question. ^^
Zsefv2 23-Nov-11 3:25am View    
Ok I put the message processing in the thread and it works better now. I still have to put that silly sleep statement though... by the way, there are several messages. 1 of them comes in at 1Hz while the other at 4Hz i tried sleep(50) only the one sending at 4Hz shows up, i put sleep(500) it works ok, but am missing some messages for the 4Hz, which is not much of a problem but I am curious is there a optimum sleep time to put in my case?
Zsefv2 22-Nov-11 20:44pm View    
i tried that before, the user interface hangs there.
Zsefv2 22-Nov-11 20:41pm View    
ok, i understand, so i should code in such a way that processing of the message is done in the thread while the main thread(mfc) should just receive the message and display only?
Zsefv2 22-Nov-11 10:50am View    
you mean the ReadData is not on the main thread?