[mythtv] Simplifying locking in ChannelScanSM

Rune Petersen rune at megahurts.dk
Sun Sep 22 13:40:42 UTC 2013


Hi,

I ran into locking issues again with 0.27:

	#11870 - Channel scanning deadlock with DVB


When debugging this I was reminded that ChannelScanSM uses the "big lock"/"lock 
everything" pattern which I'm not a big fan of.


I have an idea for fixing it:
Move all the work that modifies the state of to ChannelScanSM the scanner 
thread, that way we don't need to hold the big lock when evaluating or modifying 
the state.

Is this something you would find interesting, or are there any better ideas?

I have attaches is a PoC patch showing this.


Rune


P.S. I would also love to rewrite the business logic, but I have no way to test 
with analog and ATSC.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv_ChannelScanSM_simplify_locking_poc.patch
Type: text/x-diff
Size: 24980 bytes
Desc: not available
URL: <http://www.mythtv.org/pipermail/mythtv-dev/attachments/20130922/470c15f7/attachment.bin>


More information about the mythtv-dev mailing list