Re: NSTimer and trackpad and mouse clicks
Re: NSTimer and trackpad and mouse clicks
- Subject: Re: NSTimer and trackpad and mouse clicks
- From: Paul Davis <email@hidden>
- Date: Tue, 08 Nov 2011 14:31:19 -0500
On Tue, Nov 8, 2011 at 2:17 PM, Mark Pauley <email@hidden> wrote:
> I agree here. My caveat: be very averse to creating a new NSThread. You
> have k problems, so you spawn a new thread... now you have 2^k problems ;)
> When at all possible: prefer asynchronous / event-driven solutions to
> synchronous / concurrent solutions.
you cannot do realtime programming in this way. why? because there is
absolutely no bound on how long the event handlers will take. the
sensible thing to do, which almost everybody who writes audio & MIDI
software does, is to split things into (at least) two threads, one
with RT constraints imposed on it, and the other one free to do
basically whatever it wants, whenever it wants (GUI event handling,
redraws, chatting over the network, whatever).
multithreaded programming is hard, yes. but RT programming is hard
too. you make it harder by trying to do non-RT and RT work in the same
thread.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden