A
A
Arthur2017-07-20 11:23:46
Qt
Arthur, 2017-07-20 11:23:46

How to organize synchronization of Qthread threads WITHOUT resources?

It is necessary to synchronize the work of two threads that do NOT share any resources. It's just that one sends a start signal to the second and waits until he completes the work on his site, and only after the work of the second is completed, the first can continue to work. I know that you need to use mutexes, but everywhere there are examples where it is the resource that has this mutex. Where to put the mutex if each thread works only in its own garden and they do not have a common resource? Basically, they work asynchronously, but when some event occurs, their work needs to be synchronized.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2017-07-20
@MAKAPOH

See QWaitCondition and an example of how to use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question