Re: Inserting a method call into main thread.... how do I do it?
Re: Inserting a method call into main thread.... how do I do it?
- Subject: Re: Inserting a method call into main thread.... how do I do it?
- From: j o a r <email@hidden>
- Date: Tue, 23 Aug 2005 08:42:44 +0200
On 23 aug 2005, at 08.15, John Draper wrote:
I have a function I need to insert into the main thread of a Cocoa
application.
I need to call it once every time through the event loop. How do I
do it?
If you want it to fire every time through the run loop I think you
could use a custom run loop source - but something tells me that's
not really what you want. The run loop is not running all the time,
and not in regular intervals - that's the point. It only wakes up now
and then in response to events. You most likely want to have your
function executed on a timer.
It's also quite likely that you don't want this to happen on the main
thread - just like John said - at least if you're not very sure that
this function of yours will be able to return almost immediately.
How do I do this? Is there some sample code around that does this?
Check the sample code repository available at <http://
developer.apple.com/>.
Do people at apple really read this list? really?
Yes they do, but don't rely on them providing you with an answer.
Sometimes they do, sometimes they don't.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden