Re: Accessing user interface from ioProc
Re: Accessing user interface from ioProc
- Subject: Re: Accessing user interface from ioProc
- From: James McCartney <email@hidden>
- Date: Fri, 21 Nov 2003 15:48:28 -0800
On Nov 20, 2003, at 12:05 AM, Michael Thornburgh wrote:
from your IOProc, you can queue up something to happen in the main
thread to actually do your UI updating, see -[NSObject
performSelectorOnMainThread:withObject:waitUntilDone:] for more
information (and you _don't_ want to waitUntilDone, of course!).
I'm not an expert on the Cocoa side so I am just guessing, but I would
question whether this is safe in the ioProc. In order to send this
selector to the main thread, it is probably putting something on a
message queue and that queue is probably protected with a lock. Taking
a lock in the ioProc is not good.
When I want to do some messaging from the ioProc I use a lock free
FIFO, or a pthread_cond_signal() or a combination of both.
James McCartney email@hidden
Apple CoreAudio
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.