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

David Engel dlengel at attbi.com
Wed Nov 19 22:04:54 EST 2003


On Thu, Nov 20, 2003 at 02:37:11AM +0100, avalanche at beyondmonkey.com wrote:
> Isn't everything protected by updateLock, so even if ignoreevents
> fails it still shouldn't be a problem? 

I would have thought so, but it didn't seem to work that way.  For
example, before I started setting ignoreevents in customEvent, I could
easily cause fillRecordInfos to be re-entered.  I did this by pressing
Key_R about once a second.  Before too long, keyPressEvent would fire
off while Myth was still processing the resulting SCHEDULE_CHANGE
event in customEvent from the previous pressing of Key_R.

I don't know how Qt works internally to dispatch events, but I suspect
the fact that updateLock was defined to allow recursive locks was
allowing some unexpected behavior.

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

David
-- 
David Engel
dlengel at attbi.com


More information about the mythtv-dev mailing list