[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] kabc/lock.cpp
From:       Mark Bucciarelli <mark () easymailings ! com>
Date:       2005-03-23 12:11:17
Message-ID: 42415CE5.7040801 () easymailings ! com
[Download RAW message or body]

Tobias Koenig wrote:

>On Tue, Mar 22, 2005 at 09:38:51PM -0500, Mark Bucciarelli wrote:
>  
>
>>David Faure wrote:
>>    
>>
>Hi Mark,
>
>  
>
>>The Earthlink email architects [1] had a simple idea. Just have the 
>>process that set the lock touch the lock file periodically.  If the file 
>>date is older than the period, then you know the lock is stale.  Clever.
>>    
>>
>Sounds good, but whats about the performance?
>  
>
Optimization is the root of all evil.  ;)   I'll run some tests.  I was 
thinking of adding a timer to the lock class.

>>Putting the lock file in the 
>>same directory as the ical file allows multiple users to access the same 
>>file with proper locking, which seems useful.
>>
>>Any reason not to take that approach?
>>    
>>
>No, and for this reason we use it already ;)
>Take a look at kdelibs/kabc/lock.cpp
>  
>
Nice.  I actually had read that class, I didn't read past the part where 
the lock file is created in the users ~/.kde tree and the stale lock 
checking.  :(

Part of my suggestion was to put the lock file in the same directory as 
the ical file.  The benefit is that multiple users can edit the same 
file (say on an NFS or FTP share) and locking would work.  But I think 
this means a different Lock class for each resource type, I'm not sure 
how that would work.  For now, I'll just mess around with the above 
approach.  I like the idea of always being able to tell for sure if a 
lock is stale.

Regards,

Mark

_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic