2008-01-10 Marcus Brinkmann <marcus@g10code.de>
+ * kdpipeiodevice.cpp: New version from Frank Osterfeld.
+
* engine-gpgconf.c (gpgconf_config_load_cb2): Handle the flag
NO_ARG_DESC.
emit q->readyRead();
if ( !thisPointer )
- return;
- qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter );
- synchronized( reader ) {
- qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter );
- reader->readyReadSentCondition.wakeAll();
+ return;
+
+ if ( reader ) {
+ qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter );
+ synchronized( reader ) {
+ qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter );
+ reader->readyReadSentCondition.wakeAll();
+ }
}
qDebug( "KDPipeIODevice::Private::emitReadyRead %p leaving %d", this, counter );
while ( !cancel && !error && bufferFull() ) {
notifyReadyRead();
- if ( bufferFull() ) {
+ if ( !cancel && bufferFull() ) {
qDebug( "%p: Reader::run: buffer is full, going to sleep", this );
bufferNotFullCondition.wait( &mutex );
}