Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Asynchronous Functions and Ac... > Using Active Objects for Background ...

8.10. Using Active Objects for Background Tasks

Thus far we have discussed active objects as being simply a way to start asynchronous functions and handle their completion, but you can also use them to perform background processing as you can with threads. This example illustrates that concept. It also illustrates other concepts mentioned earlier, such as creating, starting, and stopping the active scheduler.

The example creates two active objects whose RunL() functions are invoked at specified intervals. This example uses the console and is built as an EXE executable that can be run on the emulator (see section 2.2.1 for how to create a console program).


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint