[mythtv-commits] Ticket #1173: thread leak in PreviewGenerator
MythTV
mythtv at cvs.mythtv.org
Wed Feb 1 05:43:20 UTC 2006
#1173: thread leak in PreviewGenerator
----------------------------------------+-----------------------------------
Reporter: jwestfall at surrealistic.net | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: 0.19
Component: mythtv | Version: head
Severity: medium |
----------------------------------------+-----------------------------------
Hi
so my backend is currently up to 33 threads. Most of which appear to be
the previewgenerator thread which is fired off after each recording. I
think the following code is the problem.
{{{
void PreviewGenerator::TeardownAll(void)
{
const QString filename = programInfo.pathname + ".png";
MythTimer t;
t.start();
for (bool done = false; !done;)
{
previewLock.lock();
if (isConnected)
emit previewThreadDone(filename, done);
else
done = true;
previewLock.unlock();
usleep(5000);
}
VERBOSE(VB_PLAYBACK, LOC + "previewThreadDone took
"<<t.elapsed()<<"ms");
disconnectSafe();
}
}}}
isConnected is set to true in the constructor and only gets set to false
as part of disconnectSafe(). There is no way for the for loop to exit
because of this.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/1173>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list