[mythtv-commits] mythtv commit: r9939 by danielk

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Fri May 19 16:33:46 EDT 2006


      Author: danielk
        Date: 2006-05-19 20:33:45 +0000 (Fri, 19 May 2006)
New Revision: 9939
   Changeset: http://cvs.mythtv.org/trac/changeset/9939

Modified:

   branches/mythtv-eit/libs/libmythtv/tv_rec.cpp

Log:

Fixes #1826, breakage of consecutive recording in mythtv-eit branch.

This turns out to be a fairly simple race condition.

In the EIT branch we were calling tuningRequest.deque() before TuningShutdowns(). But this is unsafe because we release the stateChangeLock when shutting down a recorder; so if another thread is in WaitForEventThreadSleep(), it can exit the wait before we finish tearing down the recorder. The fix is to just use front() to get the tuning data early enough for our uses in HandleTuning() and call deque() after we've returned from TuningShutdowns().

The patch itself is two lines of code change plus two lines of exposition.






More information about the mythtv-commits mailing list