[reSIProcate] Query
zuo bf
zuobf.bupt at gmail.com
Tue Sep 20 04:53:07 CDT 2005
Hi
I think one solution is like the resiprocate's ThreadIf.hxx, you define
code like
{
bool mShutdown;
mutable Mutex mShutdownMutex;
}
for each thread, and use the mutex to control the shutdown, use the
bool variable to terminate the thread.
A real example is the testFifo.cxx:
the code snippet is:
......
while (!mShutdown)
{
if (mFifo.messageAvailable())
{
mFifo.getNext(100);
}
else
{
unsigned wakeup = wakeups[w];
w = (w + 1) % 6;
#ifdef VERBOSE
cerr << "Consumer sleeping for " << wakeup << " ms with mSize " <<
mFifo.size() << endl;
#endif
if (wakeup > 0)
{
sleepMS(wakeup);
}
}
......
As to SDP content, i think you can use the SdpContents class to create
one, but i am not sure whether i can be used to modify one.
On 9/20/05, sumit <p.sumit at teles.com> wrote:
>
> Hi All
>
> There is this problem of infinite loop that I am facing.When I make a
> call or am receiving one for the request and responses I am finding that
> it is necessary to put it in an infinite loop of procssing which is also
> the same on checking the test examples.The problem is the stack
> receiving and sending of the data is done in a while(1) loop.What should
> be put as the termination condition.
> Also are there any API's to change the SDP content details as it is
> generally taken as Data txt format.
>
> An early response will be highly beneficial.
>
> Regards
> Sumit
>
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.sipfoundry.org
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20050920/acf066b2/attachment.htm>
More information about the resiprocate-devel
mailing list