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: "John C. Randolph" <email@hidden>
- Date: Mon, 22 Aug 2005 23:27:37 -0700
On Aug 22, 2005, at 11:15 PM, John Draper wrote:
Hi,
I posted this question yesterday, but I don't think I explained it
properly,
so I'm posting it again.
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?
Do I use a NSTimer? I may want to call this as fast as possible,
especially
if I'm streaming audio over IP connection.
If you're streaming audio, you probably don't want to do this on the
main thread. You probably want one thread to receive the incoming
data, and a separate thread to decode/play the audio you get, and
neither of them would be the main thread.
See the NSStream docs.
-jcr
John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.
_______________________________________________
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