<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 25/06/15 15:56, Ross Finlayson wrote:<br>
<blockquote
cite="mid:CA1EFD0A-2512-46AF-8F28-9A4F04E59F0B@live555.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div>Once again, folks: The best way to use the LIVE555 library is
to have *exactly one* thread that calls LIVE555 functions. This
thread (after some initialization to set up timer tasks using
“scheduleDelayedTask()”) would call “doEventLoop()”, without a
'watch variable' parameter. In other words, this thread would
do nothing but run within “doEventLoop()”, and would not block.
Your other threads (i.e., the rest of your application) can
continue to do whatever they want - except call LIVE555
functions.</div>
<div><br class="">
</div>
<div>This is the way that the LIVE555 library is intended to be
used, and it’s how almost everyone else has been using it.
Unfortunately, however, you have chosen a different model - in
which you make ‘temporary' calls into the LIVE555 library. This
complicates your code, because (1) you need to ensure that no
more than one thread of control at a time is calling LIVE555
functions, and (2) because you need to use a ‘watch variable’ in
each of your calls to “doEventLoop()”, to ensure that the calls
are temporary.</div>
</blockquote>
<br>
I think "chosen" may be over-stating it, at least in my case :-) I'm
just trying to fix a bug, although admittedly after many years of
such fixes it all gets messy and needs refactoring.<br>
<br>
<blockquote
cite="mid:CA1EFD0A-2512-46AF-8F28-9A4F04E59F0B@live555.com"
type="cite">
<div>That’s why your “live555.cpp” code is so complex. I urge you
to (sometime in the future) restructure this code - as noted
above - to use a single thread that does nothing but run inside
“doEventLoop()”. This would simplify it considerably.</div>
</blockquote>
<br>
Well, that's possible for a rainy day project... Is it allowed for
application threads to call sendXxx() methods, or (as your FAQ
suggests) does everything have to go through a triggered event, in
which the handler (which presumably we have to write?) calls
sendXxx() in the doEventLoop() thread? If the latter that adds a
shedload of complexity - there are 7 different sendXxx() calls in
20-odd places, and we would only have a (void *) to pass parameters
with...<br>
<br>
Best regards<br>
<br>
Paul<br>
</body>
</html>