Re: Best pattern to follow for scheduling an event
Re: Best pattern to follow for scheduling an event
- Subject: Re: Best pattern to follow for scheduling an event
- From: "Ken Ferry" <email@hidden>
- Date: Thu, 8 Nov 2007 11:49:11 -0800
On Nov 8, 2007 11:03 AM, John Stiles <email@hidden> wrote:
> On Nov 8, 2007, at 10:57 AM, glenn andreas wrote:
>
> >
> > On Nov 8, 2007, at 12:43 PM, John Stiles wrote:
> >
> >> I think I'm not explaining myself well enough.
> >>
> >> The typical pattern is that my method will get spammed a hundred
> >> times in quick succession. After the burst of calls has completed,
> >> I want to do fix-up.
>
> I think Joar's suggestion of a notification queue is probably the
> best approach, but it's a little more heavyweight than a timer. I
> might go that route if I find that I need more flexibility.
The notification queue is a fine option. Since no one has mentioned
it, you may also find it convenient to use
-performSelector:withObject:afterDelay: combined with
-cancelPreviousPerformRequestsWithTarget:selector:object:.
-Ken
_______________________________________________
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