[Live-devel] Event loop and threads

Juan Manuel Lopez Baio jmbaio at gmail.com
Tue Aug 22 10:53:38 PDT 2006


Hello people. I'm fairly new with livemedia, and getting the hang of
it. I'm using it to solve media broadcasting aspects of a very
specific project, and so for now I can do with the basic
implementation that already comes and the RTSPServer class.
The thing is that my app runs a few threads, in one of wich the
doEventLoop function of the BasicTaskScheduler is called. I read on
the site that livemedia is not thread-safe, so I took it into account.
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!
The variable's (actually, an object's attribute)  state is fine, and
I'm not really sure what else to check. Anyway, if someone has any
idea I'd appreciate the hand.
Thanks!

Juan

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?


More information about the live-devel mailing list