[Live-devel] Threads and event loops
Ross Finlayson
finlayson at live555.com
Wed Apr 21 17:16:28 PDT 2010
>I followed all the posts about threading and event loops some days
>ago. I also reviewed the FAQ once more and because I had done it
>several times in the past, it seems to me that the recommendation
>"Such a configuration is not recommended, however; instead, it is
>safer to structure such an application as multiple processes, not
>multiple threads." has been added recently and was not there just
>some weeks ago. Am I right?
Yes.
>When this configuration (more event loops running in separate
>threads with dedicated usage environments and task schedulers) is
>not recommended any more, it is bad news for us because our
>application is structured exactly in this configuration.
Don't worry - I just said "not recommended", not "you cannot do this"
(which I couldn't enforce anyway, because this is Open Source :-)
> Nevertheless, we have not seen any problems in this configuration
>so far, in our tests we are running up to 20 threads in one process,
>each thread is responsible for exactly one RTSP server. Could you,
>please, be more specific why this configuration is not recommended?
>Are there any known problems with this configuration? (I think the
>problem can be some static variables but since we compiled the
>live555 code to a Windows COM library and create one instance of a
>COM object for each RTSP client, maybe the static variables are not
>touched by other instances, but I am not sure about this).
We recently saw a problem (with multiple threads in a single process)
caused by a static variable. There might be others; I can't say for
sure.
>Finally, according to my opinion, this approach is far better than
>having just one thread to be responsible for many RTSP servers
>because the code contains blocking operations
Yes, the current implementation of "RTSPClient" is inadequate
(because it contains blocking operations). This is being fixed
(please be patient :-)
--
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/20100421/841b7ef5/attachment.html>
More information about the live-devel
mailing list