Example code from the Efficient Android Threading book.