• 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: Synchronized Editing Context for Locking/Unlocking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronized Editing Context for Locking/Unlocking


  • Subject: Re: Synchronized Editing Context for Locking/Unlocking
  • From: Kieran Kelleher <email@hidden>
  • Date: Fri, 3 Sep 2010 08:50:11 -0400

You need variation of usage #1

editingContext().lock();
try {

	// Do your stuff

} finally {
	editingContext().unlock();
}



On Sep 3, 2010, at 7:59 AM, Farrukh Ijaz wrote:

> Hi,
>
> What is the difference between the two? I noticed both work almost the same way.
>
> Usage 1:
>
> try {
> 	editingContext().lock();
> 	// Do your stuff
> } finally {
> 	editingContext().unlock();
> }
>
> Usage 2:
>
> synchronized(editingContext()) {
> 	// Do your stuff
> }
>
> Thanks,
>
> Farrukh _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Synchronized Editing Context for Locking/Unlocking
      • From: John Bruce <email@hidden>
    • Re: Synchronized Editing Context for Locking/Unlocking
      • From: Jean-Francois Veillette <email@hidden>
References: 
 >Synchronized Editing Context for Locking/Unlocking (From: Farrukh Ijaz <email@hidden>)

  • Prev by Date: Re: Synchronized Editing Context for Locking/Unlocking
  • Next by Date: Re: Synchronized Editing Context for Locking/Unlocking
  • Previous by thread: Re: Synchronized Editing Context for Locking/Unlocking
  • Next by thread: Re: Synchronized Editing Context for Locking/Unlocking
  • Index(es):
    • Date
    • Thread