• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: inter-process locks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inter-process locks


  • Subject: Re: inter-process locks
  • From: Alexander Cohen <email@hidden>
  • Date: Sat, 19 Feb 2011 14:20:56 -0500

Yeah, that seems like a good option but since its based off of flock, it has the same issues. Things like apps crashing or not unlocking by error will prevent other processes from obtaining the lock even though the lock is not 'really' in use anymore.

AC

On Feb 19, 2011, at 1:58 PM, Michael Babin wrote:

> On Feb 19, 2011, at 12:29 PM, Alexander Cohen wrote:
>
>> Is there anyway to do interprocess locks using cocoa ( like a Mutex in Win32 )? The best i've found is not cocoa and uses flock but the man pages say its advisory only which is kindof scary.
>
> NSDistributedLock:
> <http://developer.apple.com/library/mac/#documentation/cocoa/reference/Foundation/Classes/NSDistributedLock_Class/Reference/Reference.html>
>
> Although I've never used it in practice. The current project I'm working on uses a scheme based on flock.
>


The information contained in this e-mail and any accompanying attachments may contain information that is privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message and any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email or any attachments.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: inter-process locks
      • From: "Stephen J. Butler" <email@hidden>
References: 
 >inter-process locks (From: Alexander Cohen <email@hidden>)
 >Re: inter-process locks (From: Michael Babin <email@hidden>)

  • Prev by Date: NSCalendar dateByAddingComponents: yields inconsistent results
  • Next by Date: Re: NSCalendar dateByAddingComponents: yields inconsistent results
  • Previous by thread: Re: inter-process locks
  • Next by thread: Re: inter-process locks
  • Index(es):
    • Date
    • Thread