Answer the question
In order to leave comments, you need to log in
Does QThread (instead of threading) resolve interface update conflicts?
When using threading and changing, for example, the value of the label in the threads (a counter that increases by +1, etc.) - after all, situations may arise when 2 threads simultaneously add to 1 number and, as a result, the number changes to +1, and not +2?
And if you use QThread, then this will not happen, right?
And still some normal example for QThread, how to create a thread, pass a function and arguments to it ... do I need to write something to complete the threads, or do they end themselves when the function finishes executing?
because as I understand it, you can’t, as in threading, just start a QThread thread with target=function, args=arguments, and that’s all
Answer the question
In order to leave comments, you need to log in
QThread is just an interface to an operating system thread, much like Python's Thread. Both of them equally lead to races, deadlocks, and the like. And GUI components are not thread safe, trying to access them from different threads can cause the application to crash and behave unpredictably.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question