[mythtv] [BUG?] Endless waiting for thread...

Anduin Withers awithers at anduin.com
Fri Mar 11 01:54:45 UTC 2005


> function.  This way, no threads are ever lost, each thread blocks until
> a command is received, and we avoid the issue as it exists which
> seemingly prevents threads from pushing back onto the vector due to the
> lock checking.

Then you trade the possibility of five deadly locked calls for the very
likely scenario of one.

It isn't really a locking problem. Qt handles sockets in the main event
loop, no main event loop being called and you lose a significant amount of
functionality.

If this were just pure sockets the solution would be to select with a
timeout, if the socket closed or the timeout was hit you'd recover. With Qt
neither of those things can happen until the main event loop has a chance to
run.

The quick fix should be to call the event loop, I thought there was a
problem with this but if there is it doesn't matter (as it is done in
ReadStringList a few lines further down).

-- 
Anduin Withers



More information about the mythtv-dev mailing list