Re: question about CoreMIDI & cocoa
Re: question about CoreMIDI & cocoa
- Subject: Re: question about CoreMIDI & cocoa
- From: john <email@hidden>
- Date: Tue, 28 Sep 2004 20:25:05 -0400
Hi Robert,
I see, communication between threads is definitely not always
straightforward. I personally always use performSelectorOnMainThread:
in CA ioprocs. I've never gotten spanked :) Communicating between
threads would probably be the better alternative, but
performSelectorOnMainThread is just so easy!
I should have put that in the example code I posted.
-- John
Hi John,
Certainly calling Obj-C methods from C code is not a problem - it's
the thread communication that's the problem as AppKit is not generally
thread-safe.
I seem to remember getting spanked over using the approach the Shaun
suggests (performSelectorOnMainThread) as it allocates memory which
can block the MIDI thread (perhaps I'm mis-remembering) - various
non-blocking queueing mechanisms were then discussed - it's all in the
archives.
Anyway - for most apps performSelectorOnMainThread will do the job -
IMHO (which I would have suggested if I had not gone through the
spanking before ;-))
Robert.
_______________________________________________
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