Skip navigation.
 
mlRe: Checking file modification dates in NSDocument
FROM : Jordan Krushen
DATE : Fri Jul 28 22:53:15 2006

On 7/28/06, Sanford Selznick <<email_removed>> wrote:

> At 11:40 AM -0700 7/28/06, Jordan Krushen wrote:


> >Then you're aware that all of the other work you're doing is
> >ultimately for nothing, due to the inherent race condition between
> >when you check for changes and when you commit the new file?

> You are right, of course.  File Locking is the right solution.
> Unfortunately it's a royal pain the butt.  And every app has to do it.


> So what's the solution?  Stop using NSDocument?


I haven't yet done this with Cocoa myself, but perhaps
NSDistributedLock would be something to try:

<file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/Reference/Foundation/Classes/NSDistributedLock_Class/Reference/Reference.html>

J.

Related mailsAuthorDate
mlChecking file modification dates in NSDocument Sanford Selznick Jul 28, 01:18
mlRe: Checking file modification dates in NSDocument Jordan Krushen Jul 28, 20:40
mlRe: Checking file modification dates in NSDocument Sanford Selznick Jul 28, 22:01
mlRe: Checking file modification dates in NSDocument Jordan Krushen Jul 28, 22:53
mlRe: Checking file modification dates in NSDocument Sanford Selznick Jul 28, 23:04
mlRe: Checking file modification dates in NSDocument Jordan Krushen Jul 28, 23:26