[mythtv] Re: [mythtv-commits] mythtv commits

David Engel dlengel at attbi.com
Thu Nov 20 02:15:02 EST 2003

On Thu, Nov 20, 2003 at 06:15:32AM +0100, avalanche at beyondmonkey.com wrote:
> The recursive mutex is needed because the keyEvent calls qApp->update() 
> and qApp->update() calls paintEvent and paintEvent depends on the 
> same lock as keyEvent, resulting in a lockup.

I was afraid of that.  What is the recommended way to protect a
critical section in Qt if it can pass you an event at almost any time?
I'm guessing now that the reentrancy I was seeing before was because
Qt was calling keyPressEvent when customEvent blocked using a QSocket.

> I think we might be able to get away with a non recursive mutex if
> all the update() calls are replaced with flags and the updating is
> done at the end of keyEvent(), after the mutex is unlocked. I'll 
> give it some more thought tommorrow.

OK, I'll defer to you since you certainly know more about Qt's
workings than me.

David Engel
dlengel at attbi.com

More information about the mythtv-dev mailing list