[mythtv-commits] Ticket #2019: Replace a tight loop with the use of a thread condition
MythTV
mythtv at cvs.mythtv.org
Tue Jul 4 22:17:56 UTC 2006
#2019: Replace a tight loop with the use of a thread condition
--------------------------------+-------------------------------------------
Reporter: russell at digium.com | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone:
Component: mythtv | Version: head
Severity: medium | Resolution:
--------------------------------+-------------------------------------------
Comment (by russell at digium.com):
I have attached an updated patch (thread_conditions_rev2.patch) that
includes a few more thread synchronization related changes.[[BR]][[BR]]
In libs/libmythtv/tv_play.cpp: I changed a check of locked() and then a
call to lock() on a QMutex to the equivalent use of tryLock(). I also
fixed the indentation of 4 lines to match the coding guidelines. They
were indented by an extra space.[[BR]][[BR]]
In programs/mythfrontend/networkcontrol: I have elimated the need for the
variables runCommandThread and commandThreadRunning and the use of a tight
loop. In fact, the loop that was checking commandThreadRunning wasn't
needed in the first place, because the call to pthread_join would
automatically block and do the same thing without a busy wait.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2019>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list