Chapter 6. Threads and concurrency
In this chapter
- Creating and managing threads
- Communicating between threads
- Timers and message loops
This web of time—the strands of which approach one another, bifurcate, intersect or ignore each other through the centuries—embrace every possibility.
The Garden of Forking Paths
You’ve seen in the previous chapter how to run parts of your application as a Service, which is a great way of performing tasks that don’t require interaction with the user. These tasks are typically, continuously or periodically, executed routines, which is why it makes sense to have them run in the background. When we say background, we mean they’re not visible to the user, but it must be stressed that it does not necessarily ...
Get Android in Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.