[Live-devel] Event loop and threads

Ross Finlayson finlayson at live555.com
Tue Aug 22 11:17:24 PDT 2006


>The only "shared" information is the watchVariable used by the loop to
>know when to quit, which I set to true from the main thread when
>trying to leave the program, so that doEventLoop finally returns
>making it possible to join its thread and finish the program.
>Well, if I pass that watchVariable already set, then the loop never
>even starts, which is fine, (if somewhat useless); but, if I try to
>set it afterwards, then when I try to join the thread at the end of
>the program (pthread_join, from posix thread), it never comes back!

What may be happening is that your event loop has no pending events 
(i.e., no incoming network packets to be handled, and no pending 
delayed tasks).  If that happens, the event loop will (quite 
correctly) block indefinitely in "select()", and will never get 
around to checking the watch variable.

For a way to overcome this, see 
<http://lists.live555.com/pipermail/live-devel/2006-March/004192.html>

>PS: I'm sending this mail to live-devel at ns.live555.com as I see the
>rest doing, even though when I signed up the list told me to send them
>to live-devel at lists.live555.com. What's with that?

Right now "lists.live555.com" and "ns.live555.com" are the same host. 
That might not remain true in the future, though.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20060822/983cd081/attachment.html 


More information about the live-devel mailing list