This can definitely cause concurrency problems. When you leave vi, the temp file is removed. If you saved changes, they're written out before the files deleted. If not, its simply removed. As mentioned before, vi has several modes of operation.
Different authors use different names.
I personally refer to them as scroll mode, insert mode, and command mode. The text book refers to these as command mode, input mode, and last line mode, respectively. I apologize in advance for the confusion. This is the default mode, the one you're in when you start vi. Ok, for this mode the text probably has a better name.