[Live-devel] Do the test applications ever sleep?

Ross Finlayson finlayson at live555.com
Thu Aug 16 13:28:04 PDT 2012


> While investigating another issue I began to dig a little deeper into how the library operates and it appears to me that the process running the servers never sleeps, is this correct?

Not really.  I don't know what specifically you mean by 'sleep', but - as you know - LIVE555-based applications are event driven, and execute code only when handling an event.  When there are no events to be handled, then the application does not run.  You can call this 'sleeping' if you like.

What you might be referring to, however, is the fact that - in the "BasicTaskScheduler" implementation - there is a periodic delayed task called "schedulerTickTask()" that runs every 10 milliseconds (not 10 microseconds as the comment in the code incorrectly says).  This task does no work, and exists only to ensure that the code periodically returns from "select()", to handle any triggered events.  But this causes only a brief period of activity (with almost no overhead) every 10 ms; for the rest of the time, the application is effectively 'sleeping' if there are no other events to be handled.


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/20120816/82249bf5/attachment.html>


More information about the live-devel mailing list