Re: Inserting a task into the run loop
Re: Inserting a task into the run loop
- Subject: Re: Inserting a task into the run loop
- From: Ken Thomases <email@hidden>
- Date: Sun, 22 Mar 2015 17:52:31 -0500
On Mar 22, 2015, at 5:23 PM, Graham Cox <email@hidden> wrote:
> I need my code to run all the time. It's not heavyweight processing, so it isn't going to be a huge drain on anything, but it does need to have frequent calls. My timer approach does keep the run loop awake, but it feels a bit off to be using a timer for something that isn't truly a time-related task, only a task that needs to run "as often as possible".
>
> My code can also run as a separate thread, and when it does so, it's just an endless loop.
I'd be curious to know how "run all the time", "run as often as possible", and "an endless loop" jibe with "not heavyweight processing" and "isn't going to be a huge drain on anything" in your mind.
Processor intensive code is not code which does "hard" work. It's just code that runs all the time.
I think you need to think more about what you need and whether it's reasonable.
Regards,
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