Android potential parallel read/write issue
<p>The Android documentation states that "one activity in your application might be instantiated multiple times". Let's now assume that:</p>

<ul>
<li>I use onStart() to save state in permanent storage</li>
<li>I use onStop() to load state from permanent storage</li>
</ul>

<p>Now let's assume that I have 2 instances of my main activity (inst1 &amp; inst2) and that I have the following call sequence:</p>

<ol>
<li>inst1.onStart()</li>
<li>inst2.onStart()</li>
<li>inst1.onStop()</li>
<li>inst2.onStop()</li>
<li>inst1.onStart()</li>
</ol>

<p>Then, this would mean that instance #1 would end up loading the state of instance #2.</p>

<p>Is this a possible scenario ? If yes, how can this be avoided ?</p>

<p><strong>Edit</strong>: actually, it looks like this scenario is not possible since you cannot possibly have 2 instances of the same activity in the "running" state at the same time.</p>
