[mythtv] [patch] thread safe verbose v2

Isaac Richards ijr at case.edu
Fri Jan 21 01:31:54 EST 2005


On Tuesday 18 January 2005 10:50 am, Daniel Thor Kristjansson wrote:
> As noted by Eric Anderson, someone might call a function that uses
> VERBOSE inside a VERBOSE macro. This updated patch uses a recursive
> lock to prevent this case from deadlocking the application.
>
> If someone engages in blocking inter-thread communications with
> another thread that also uses VERBOSE while within the VERBOSE
> macro this would still deadlock. But I think we would want to
> find any such coding monstrosities.
>
> I've not had any deadlocks even with a the fast lock in my first
> thread safe verbose patch.

How 'bout a QMutex? =)  I'd really like to eventually move away from direct 
pthread usage..  helps possible porting.

Isaac


More information about the mythtv-dev mailing list