writing to a file (atomic operation)
Chris Gonnerman
chris.gonnerman at newcenturycomputers.net
Sun Jun 2 01:23:51 EDT 2002
----- Original Message -----
From: "Brian Lee" <senux at senux.com>
> Is this a atomic operation?
>
> open('/tmp/test.log', 'a').write('test\n')
>
> from py newbie.
No. Why exactly do you need it to be? "Atomic" means that it can't be
interrupted by another process before completion; not many operations
are truly atomic in modern OS design.
Very little of what you do in Python will be truly atomic.
Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net
More information about the Python-list
mailing list