Re: Synchronized Editing Context for Locking/Unlocking
Re: Synchronized Editing Context for Locking/Unlocking
- Subject: Re: Synchronized Editing Context for Locking/Unlocking
- From: Jean-Francois Veillette <email@hidden>
- Date: Fri, 3 Sep 2010 09:47:57 -0400
Le 2010-09-03 à 08:50, Kieran Kelleher a écrit :
> You need variation of usage #1
>
> editingContext().lock();
> try {
>
> // Do your stuff
>
> } finally {
> editingContext().unlock();
> }
Just in case editingContext() doesn't return the same editing context (« Do your stuff » might change it), take a local copy of it:
EOEditingContext ec = editingContext();
ec.lock();
try {...} finally { ec.unlock(); }
jfv
_______________________________________________
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