[SOLVED]multi-thread & network problem !
General and Desktop
4
Posts
2
Posters
1.3k
Views
2
Watching
-
i use a new thread to tick Network IO.
and a QTimer ticking in the Main Thread to readData from the server.
also the data is sended from the Main Thread.
here is my question, eg:- i enter the login info in ClassA in the main thread, and send the info to the server;
- a func in ClassA is called in the QTimer in the Main Thread in order to process the readData from the server.
is it OK? and what should i do between the 2 step above, should i block the Main Thread until the step 2 succeed?