Hi Susanne,

On 2012-09-13, at 8:57 AM, Susanne Schneider wrote:

> Hi all,
> 
> please allow me to add one question regarding this interesting topic.
> 
> Alexis Tual (my mail client has problem with correct quoting) has suggested 
> for EOF background handling:
> <snip>
> ec.lock();
> try {
>   // huge loop to compute stats
>   for (i = 0; i < 1000000; i++) {
>        // doing stuff with ec...
>       // cycling the ec
>        if (i % 100 == 0) {
>           ec.unlock();
>           ec.dispose();
>           ec = newEditingContextForMyWork();
>           ec.lock();
>        }
>   }
> } finally {
>   ec.unlock();
> }
> </snip>
> 
> Now my question: is it correct to dispose the ec after unlock or would it be 
> better to do this beforehand, like:
> 
>       ec.dipsose();
>       ec.unlock();

It is correct to unlock it before disposing it.

> If I turn on the ec-lock logging in my application, there are many remarks 
> from the Finalizers like: "*** EOEditingContext: access with no lock: 
> _eoForGID()!" Is this a real problem or can it be ignored?

I am not sure, can you send the full stack trace?


Chuck


-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects









 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to