• 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: Delay when posting a notification to NSNotificationCentre
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delay when posting a notification to NSNotificationCentre


  • Subject: Re: Delay when posting a notification to NSNotificationCentre
  • From: Simon McLean <email@hidden>
  • Date: Thu, 12 Mar 2009 20:09:31 +0000

Hi Chuck -

I'm going to have to get you a cape with the words "Wonder Chuck" on
the back :-)

That's fixed it! I still don't see why though ?

I've stuck a bug report & patch on jira too:

http://issues.objectstyle.org/jira/browse/WONDER-245

Many thanks! Simon


2009/3/12 Chuck Hill <email@hidden>:
>
> On Mar 12, 2009, at 5:43 AM, Simon McLean wrote:
>
>> Thanks for the tips chaps. I've popped everything into an executor
>> pool now and the notifications now behave how as i want them to. But
>> now i've run back into an issue (bug?) with
>> ERXFetchSpecificationBatchIterator which throws a wobbly when running
>> in a thread :-(
>>
>> http://lists.apple.com/archives/webobjects-dev/2009/Mar/msg00029.html
>
> Can you build Wonder?  Try changing the constructor from
>
>        if (qualifier != null) {
>
>  this.fetchSpecification.setQualifier(entity.schemaBasedQualifier(qualifier));
>        }
>
> to
>
> ec.rootObjectStore().lock();
> try {
>        if (qualifier != null) {
>
>  this.fetchSpecification.setQualifier(entity.schemaBasedQualifier(qualifier));
>        }
> } finally {
>        ec.rootObjectStore().unlock();
> }
>
>
> Chuck
>
>
>> 2009/3/10 Mike Schrag <email@hidden>
>>>>
>>>> Is that normal behavior ? The java docs don't talk about the sequence of
>>>> events, but I presumed that the notifier would just makes it's notification
>>>> then get on with whatever it has to do next and not care about what the
>>>> listeners are doing, or how long it takes them to do it.
>>>
>>> this is normal ... receipt of notifications happens in-thread with the
>>> event dispatch, which is actually required in some cases, since WO/EOF use
>>> notifications in several cases for synchronous events (when a new eoadaptor
>>> channel is needed, for instance).
>>>
>>>> Do i just need to stick the listeners job into a thread to get it to run
>>>> in the background ?
>>>
>>> I would personally recommend using a Java 1.5 ExecutorPool rather than
>>> doing anything with your own threads (you don't want to kill your app
>>> because you're spawning tons of threads by accident).
>>>
>>> ms
>>>
>>> _______________________________________________
>>> 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
>>
>
> --
> 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/products/practical_webobjects
>
>
>
>
>
>
>
 _______________________________________________
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: Delay when posting a notification to NSNotificationCentre
      • From: Chuck Hill <email@hidden>
References: 
 >Delay when posting a notification to NSNotificationCentre (From: Simon McLean <email@hidden>)
 >Re: Delay when posting a notification to NSNotificationCentre (From: Mike Schrag <email@hidden>)
 >Re: Delay when posting a notification to NSNotificationCentre (From: Simon McLean <email@hidden>)
 >Re: Delay when posting a notification to NSNotificationCentre (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Jad?
  • Next by Date: Re: Delay when posting a notification to NSNotificationCentre
  • Previous by thread: Re: Delay when posting a notification to NSNotificationCentre
  • Next by thread: Re: Delay when posting a notification to NSNotificationCentre
  • Index(es):
    • Date
    • Thread