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

avalanche at beyondmonkey.com avalanche at beyondmonkey.com
Thu Nov 20 00:15:32 EST 2003


----- Original Message ----- 
From: "David Engel" <dlengel at attbi.com>
To: "Development of mythtv" <mythtv-dev at mythtv.org>
Sent: Thursday, November 20, 2003 4:04 AM
Subject: Re: [mythtv] Re: [mythtv-commits] mythtv commits
> 
> > Anyway, the trylock stuff 
> > sounds much better, I overlooked that method in the QT docs, I wanted 
> > to use locked() but didn't, since the docs say it's not defined for
> > all platfoms so I went for the ignoreevents approach.
> 
> I've thought about this a little more and wonder why the straight
> forward approach of using a non-recursive, blocking lock each time an
> event is dispatched.

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 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.

av





More information about the mythtv-dev mailing list