A service would have little benefit if you had no way to schedule or control the timing of the tasks it needed to perform. In the previous chapter, Chapter 11, the service waited on incoming connections, so scheduling was not a problem. In many cases, services will perform one or more tasks not based on a request but instead based on a polling action—the service waits for something to occur and then reacts. Examples include waiting for a data file or an NT event, reading a Web page, or any other situation that allows the service to poll before firing whatever task it is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.