discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheduling functions to be run all the time in runloop


From: Richard Frith-Macdonald
Subject: Re: Scheduling functions to be run all the time in runloop
Date: Mon, 9 Jul 2012 22:24:14 +0100

On 9 Jul 2012, at 20:58, Ivan Vučica wrote:

> Hi,
> 
> for Core Animation's implicit animations to work properly, I need to schedule 
> creation and flushing of implicit CATransaction whenever event processing is 
> entered, and whenever the runloop code is entered again. This can be either a 
> C function or an Objective-C method, but I need these two pieces of code to 
> run each and every time runloop calls user code and whenever user code is 
> done running.
> 
> Note, I'm not trying to accomplish continuous calling of these methods 
> (that's trivial using e.g. timers); instead, I need these methods to be 
> called, for example, when user chooses a menu item or clicks on a button.
> 
> What's the easiest way to accomplish this?

- performSelector:target:argument:order:modes: will work the next time the loop 
runs ... if that's what you want.
You can also use NSNotificationQueue ... maybe the queue scheduling is what you 
want.

But you say 'every time runloop calls user code and whenever user code is done 
running' ... so it's not clear when you actually want to run them.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]