Android - Thread safety while updating arraylist <p>My Activity consists of a BroadcastReceiver and an AsyncTask, both of them update an ArrayList (very often). I understand that an AsyncTask runs in the background, and there may be a possibility where the BroadcastReceiver and the AsyncTask threads may update the ArrayList at the same time. How can I make them thread-safe ?</p> <p>EDIT: As alexander mentioned, a BroadcastReceiver is run on the main thread unless you explicitly implement it otherwise.</p>