Re: inter-process locks
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