avoid blocking ui while multithreading

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



avoid blocking ui while multithreading



I'm trying to figure out how to not block my main program while running a multi-threaded producer/consumer scenario. Everything I read suggests the main thread calls join() which I believe is a blocking scenario.



Is this doable in multithreading?
Should I try multiprocessing instead?





you can also detach
– apple apple
Aug 12 at 4:23


detach





You'd need three threads: 1.UI 2.producer 3.consumer.
– Hi I'm Frogatto
Aug 12 at 4:27






Also, in Qt thanks to its signal/slot mechanism, this job can be easily done. You won't need to join() threads. joining is a blocking action. To stop threads, send them a signal to stop and connect their void QThread::finished() signal to a UI thread's slot. When this slot gets called, you will know that that thread has been joined.
– Hi I'm Frogatto
Aug 12 at 4:33



join()


void QThread::finished()









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard