<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] Event loop and
threads</title></head><body>
<blockquote type="cite" cite>The only "shared" information
is the watchVariable used by the loop to<br>
know when to quit, which I set to true from the main thread when<br>
trying to leave the program, so that doEventLoop finally returns<br>
making it possible to join its thread and finish the program.<br>
Well, if I pass that watchVariable already set, then the loop
never<br>
even starts, which is fine, (if somewhat useless); but, if I try
to<br>
set it afterwards, then when I try to join the thread at the end
of<br>
the program (pthread_join, from posix thread), it never comes
back!</blockquote>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>For a way to overcome this, see <<font face="Lucida Grande"
size="-4"
color="#000000"
>http://lists.live555.com/pipermail/live-devel/2006-March/004192.html</font
>></div>
<div><br></div>
<blockquote type="cite" cite>PS: I'm sending this mail to
live-devel@ns.live555.com as I see the<br>
rest doing, even though when I signed up the list told me to send
them</blockquote>
<blockquote type="cite" cite>to live-devel@lists.live555.com. What's
with that?</blockquote>
<div><br></div>
<div>Right now "lists.live555.com" and "ns.live555.com"
are the same host. That might not remain true in the future,
though.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>