No, they don't block. If they did, the performance would be lousy.

And depending on your deployment scenario, it wouldn't even make sense to 
block, as multi-process environments can't be synchronized by this.

There are several options you have:

 - create temp files that you then move to the destination - this will work 
because file moving is an atomic operation

 - use a cooperative file-lock. There are recipes on activestate on how to do 
this in a cross-platform manner.

Diez
-----Ursprüngliche Nachricht-----
Von: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Gesendet: 24.10.08 05:36:36
An: TurboGears <[email protected]>
Betreff: [TurboGears] Concerned about creating/using directories if *multiple* 
users...


My web app creates, writes to and deletes a temporary directory if a
certain method is invoked.

I'm concerned about implications if multiple users call this method at
the *same time*.  They will all be trying to create/delete/write
simultaneously which will lead to problems right?....

In other words, TurboGears methods don't "block" for each user right?
I can't assume each method is only invoked once at a time right?

(I'm aware of Python's tempfile module to create temp files/dirs.  I
was hoping to avoid it. :)

Any help greatly appreciated.

Chris







_________________________________________________________________________
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten! 
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to