multithreading - Emit signals or post events from QRunnable -


is emitting signals inside qrunnable::run() right thing do? need inform gui thread image processed qrunnable done. using qthreadpool/qrunnable because need able add new tasks pool while there tasks in already. find kind of hard qtconcurrent , qfuturewatcher.

the qrunnable using qobject created in run() connect target qobject , emit signals.

if emitting qrunnable not thing, possible post events there?

yes, emitting signals , posting events fine things in qrunnable::run() because both thread-safe. signals , events handled properly, qobjects must have correct thread affinity. see threads , qobjects more details.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -