[Live-devel] DelayQueue infinite loop
Kenneth Forsythe
Kenneth.Forsythe at activu.com
Thu Aug 28 05:01:03 PDT 2014
Hi Ross,
No sir, not using any threading yet. Because it is stuck in the while loop, the call BasicTaskScheduler::createNew() is not even returning.
It works in the testRTSPClient program and in my own test program, but not when in this COM library that is being hosted in another program.
I'll have to dig deeper to see if I can get more info.
Thanks,
From: live-devel [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Tuesday, August 26, 2014 5:23 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] DelayQueue infinite loop
DelayQueue::synchronize appears to be stuck in that while loop. It appears curEntry->fDeltatTimeRemaning is always (0,0)
No, that shouldn't happen. See below.
This is in DelayQueue.cpp at DelayQueue::synchronize
Loop starts at line 214.
DelayQueueEntry* curEntry = head();
while (timeSinceLastSync >= curEntry->fDeltaTimeRemaining) {
timeSinceLastSync -= curEntry->fDeltaTimeRemaining;
curEntry->fDeltaTimeRemaining = DELAY_ZERO;
curEntry = curEntry->fNext;
}
Note that "curEntry" is set to the next entry in the queue, before continuing the loop. Also, each delay queue is set up so that the last entry in the queue has a delay ("fDeltaTimeRemaining") of 'eternity' (in reality, 68 years). So the condition "timeSinceLastSync >= curEntry->fDeltaTimeRemaining" is never true for the last entry in the queue, and so the "while()" loop will always terminate.
So, something else must be wrong in your system. (I hope you don't have more than one thread trying to use the same UsageEnvironment & TashScheduler?)
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/20140828/7f82ff3e/attachment.html>
More information about the live-devel
mailing list