This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author flavio.ribeiro
Recipients flavio.ribeiro, hltbra, r.david.murray, ronaldoussoren, tati_alchueyr
Date 2012-07-19.20:40:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342730413.72.0.464161206908.issue15398@psf.upfronthosting.co.za>
In-reply-to
Content
For doc purposes:

My first shot is that in my machine the os.rename isn't atomic and this could be generating an overhead somehow. Looking at the code, I found decisions being made on posixmodule.c about what `rename` function should be used:

 #ifdef HAVE_RENAMEAT
     if (dir_fd_specified)
         result = renameat(src_dir_fd, src.narrow, dst_dir_fd, dst.narrow);
     else
 #endif
         result = rename(src.narrow, dst.narrow);
     Py_END_ALLOW_THREADS
 

In my machine the second `rename` is being used.
History
Date User Action Args
2012-07-19 20:40:13flavio.ribeirosetrecipients: + flavio.ribeiro, ronaldoussoren, r.david.murray, tati_alchueyr, hltbra
2012-07-19 20:40:13flavio.ribeirosetmessageid: <1342730413.72.0.464161206908.issue15398@psf.upfronthosting.co.za>
2012-07-19 20:40:13flavio.ribeirolinkissue15398 messages
2012-07-19 20:40:12flavio.ribeirocreate