[mythtv] mythfrontend on ubuntu 17.04 testing X11 ICE problems
Derek Atkins
warlord at MIT.EDU
Tue Feb 7 17:48:01 UTC 2017
Roger,
Roger James <roger at beardandsandals.co.uk> writes:
> Here is a suggested patch against mythdbcon.cpp in 2.8-fixes. It could
> used at other places where sleep or other blocking system calls are
> being called on a main GUI thread.
>
> - sleep(m_dbparms.wolReconnect);
> + QTime sleepTime =
> QTime::currentTime().addSecs(m_dbparms.wolReconnect);
> + while (QTime::currentTime() < sleepTime)
> +
> QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents,
> 100);
One problem with this patch is that it will spin the CPU for the
wolReconnect idle time, which isn't very nice.
What exactly is the problem with using sleep()?
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the mythtv-dev
mailing list