[mythtv-commits] Ticket #2019: Replace a tight loop with the use of a thread condition
MythTV
mythtv at cvs.mythtv.org
Tue Jul 4 02:45:51 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 |
--------------------------------+-------------------------------------------
There are various places throughout the code that use a tight loop and a
call to usleep() to wait for a certain condition. I have attached a patch
that converts one of these cases to use a more efficient method, a thread
condition.[[BR]][[BR]]
In this case, the loop had two conditions it was waiting on. It was
waiting on both the event thread to start and set the runMainLoop variable
to true, and also that the errored variable was never set to true.
However, there is no code path where errored could be set to true before
runMainLoop is set to true, so the second part of that condition had no
effect.[[BR]][[BR]]
I am also available on IRC as "russellb".
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2019>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list