On Apr 5, 2011, at 9:55 AM, Anthony wrote:
> Yes, that's a race condition with writing. My point was that even if the 
> first action is merely reading (but not doing any writing), you can have 
> problems. For example:
>  
> Action 1: read session
> Action 2: read session
> Action 2: write session
> Action 1: make some decision/calculation based on session data that is no 
> longer up to date
> 

Actually, I don't see that sequence as a real problem, because the result is 
identical to this sequence:

Action 1: read session
Action 1: make some decision/calculation based on session data that predates 
write-2
Action 2: read session
Action 2: write session

That is, action 1 shouldn't rely on the timing of action 2. If only one of the 
actions is writing, then they both have a consistent view of the session.

Reply via email to