[mythtv] Re: [mythtv-commits] mythtv commits
Isaac Richards
ijr at po.cwru.edu
Thu Nov 20 03:09:13 EST 2003
On Thursday 20 November 2003 02:15 am, David Engel wrote:
> 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've just been doing the ignoreevents stuff to make things dump out, but it
may be possible to use QEventLoop::processEvents() to handle things.
The main issue is that QSocket needs the event loop just to send or receive
data. If it were replaced with a non-async socket class that didn't use the
main event loop, most all of these problems would go away =) Just a matter
of finding the time to do the work...
Isaac
More information about the mythtv-dev
mailing list