concurrent access to object file

Mike Meyer mwm at mired.org
Thu May 26 18:02:29 EDT 2005


"Frank Abel" <frankabel at tesla.cujae.edu.cu> writes:

> Hi again!
>
> I will make the question more simple:
>
> If two call to the "write" method of a file object "occur simultaneously "
> is totally sure that the data of each call is writen successive or exist the
> posibility of merge data?

Youv'e asked this before and failed to get an answer. I think you
failed to get an answer because there isn't a definitive one.

fileobject.c passes calls to the the write method to the C library
fwrite call. How that behaves under simultanious access depends on the
library implementation, and that probably depends on the underlying
OS. On Unix, that probably depends on how you got the file descriptors
the two file objects are using for I/O.

> where I can find information about this?

Check the C and system library documentation for the platform you're
running on.

If you want to make your code portable, don't do this.

   <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list