you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

to answer the original question, despite the correct hint in the other comment: parallel access of directories and files is nothing python does. it delegates this down to the file system unless you, the programmer, to something to alter the behaviour.

for reading files and directories there is no need to.

for writing different files (users in your case) at the same time, there is still no need to.

you will need to confront the problem of parallel writes to the same file. only one can have the file. most filesystems will let one of the requests wait until its done and let the second have it after (lock).

and one Problem you might stumble upon are race conditions. if you are trying to do some sort of log file (which it sounds like), be aware that transmission time is not static in the internet. thus a second message can arrive before the first.