[Qt-interest] Temporarily 'ignoring' QIODevice::readyRead() in multithreaded app

Preet preet.desai at gmail.com
Mon Dec 7 16:33:12 CET 2009


Hey all,

I'm trying to write a multithreaded qt app that interacts with devices using
QIODevice. I use readyRead() to 'service' one of the devices. Specifically I
use the readyRead() signal because one of my devices spontaneously generates
data I need to handle with the application.

However the problem in this is that the device may generate a lot of data at
once, either repeatedly emitting readyRead() in my application, or emitting
readyRead() very sparsely. When a lot of data is generated spontaneously, my
signal handler (slot) is unable to finish execution without being preempted
by the readyRead() signal. I need a way to 'ignore' signals after receiving
readyRead() initially, and then enable signals once again when my signal
handler function has completed execution.

I would appreciate any advice!

Preet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091207/8cc62977/attachment.html 


More information about the Qt-interest-old mailing list