• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inserting a method call into main thread.... how do I do it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Inserting a method call into main thread.... how do I do it? (From: John Draper <email@hidden>)

  • Prev by Date: Inserting a method call into main thread.... how do I do it?
  • Next by Date: Sleepycat Database
  • Previous by thread: Inserting a method call into main thread.... how do I do it?
  • Next by thread: Re: Inserting a method call into main thread.... how do I do it?
  • Index(es):
    • Date
    • Thread