• 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: "Stephen J. Butler" <email@hidden>
  • Date: Sat, 19 Feb 2011 13:31:35 -0600

On Sat, Feb 19, 2011 at 1:20 PM, Alexander Cohen <email@hidden> wrote:
> 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.

If an app crashes or exits then the OS automatically releases all its
resources, including flocks. I don't know why you would think
otherwise.

If your app has an error where some code path fails to unlock... well,
that's an issue across almost every locking primitive.

Personally, I'd use semget in this case. But nothing wrong with flock.
_______________________________________________

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

References: 
 >inter-process locks (From: Alexander Cohen <email@hidden>)
 >Re: inter-process locks (From: Michael Babin <email@hidden>)
 >Re: inter-process locks (From: Alexander Cohen <email@hidden>)

  • Prev by Date: Re: 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